I'm not sure I would really describe Mann and Mahler as "friends", since that word implies a closeness that simply wasn't there as far as I can tell from the biographies of each that I have read - more like casual acquaintances. Certainly they admired each other and met a couple of times, and Mann attended the premiere of Mahler's 8th in Munich in September 1910. But other than that, I don't know how much of Mahler's work Mann actually heard in Mahler's lifetime, or how much of Mann's work up to that point Mahler had read. What may have eventually blossomed into a genuine friendship was cut short, of course, by Mahler's early death so soon after the two had initially become acquainted. It's also worth noting that in the English edition of Mann's selected letters from 1895-1955, Mahler is mentioned only once - and that briefly in a 1921 letter on Mahler's having inspired some of his portrait of the paradigmatic "artist".
It's also important to remember that by the time of Mahler's death in 1911, Mann had not yet written most of the works upon which his fame and reputation rests. His great early work, Buddenbrooks, had appeared in 1901, and remained his most famous and substantial work until the publication of Death in Venice in 1912, The Magic Mountain in 1924, Joseph and His Brothers from 1933-1943, and Doktor Faustus in 1947, with many shorter and lesser works in between. So, the "Thomas Mann" Mahler knew was not quite the same "Thomas Mann" the world knows now, since his greatest mature works were still well ahead of him.
The Magic Mountain is one of my favorite books of all time. Having read both the Woods and the old Lowe-Porter translations, I much prefer the Woods - too many archaic Britishisms in Lowe-Porter that just don't sound like Mann. It's length may seem daunting, but it actually moves briskly, and once you get into it, you won't want to stop. Quite simply one of the greatest books of the last 100 years, and a brilliant elegy for the "Old Europe" that died in the trenches of World War I. The final paragraphs of the book are utterly sublime, and will have you nearly in tears as the wistful, melancholy strains of Schubert's Der Lindenbaum echo in your head.
Doktor Faustus is also a must for any music lover - but the Schoenberg connection has been greatly exaggerated. Though Mann's protagonist, Leverkuhn, uses a form of the 12-tone system, he should no more be equated with Schoenberg than Eschenbach in Death in Venice should be equated with Mahler. Mann was not writing roman-a-clefs, and inspiration is not the same as identity. Whatever Mann took from Schoenberg and Mahler as influences was transmuted into Mann's own unique artistic creations.