There have been many instances in which a composer's misery, be it physical (such as Beethoven's deafness or Schubert's syphilis) or mental (such as Schumann's hallucinations or Tchaikovsky's homosexuality), has inspired great works of art. But that was not the case with Gustav Mahler. Some of his most heart-breaking music was composed during the happiest time of his life.

In 1902, he married Viennese beauty Alma Schindler, who was half his age. Later that year, their first child, Maria Anna, was born. Anna Justine was born two years later.

The courting of 22-year-old Alma sounded promising at first, inspiring Mahler to write probably his most famous love song, the Adagietto from the Fifth Symphony, the theme song in Luchino Visconti's celebrated 1971 film Death in Venice.

However, instead of living the life of a happily married family man, with the respect that came with his job as director of the Vienna Court Opera, the composer began to venture into dark territory.

His Sixth Symphony, which Mahler composed mostly while Alma was pregnant with their second child and completed when Anna Justine turned three months old, is a case in point.

'It was a work of total despair, without redemption, the saddest of all,' says Edo de Waart, music director of the Hong Kong Philharmonic and a renowned Mahler conductor.

He also set music to Friedrich Ruckert's Kindertotenlieder ('songs on the death of children'), which describes the German poet's children succumbing to scarlet fever. Mahler premiered it in 1905, much against the wishes of his wife, a mother of two.

When Mahler premiered his Sixth Symphony, in 1906, the audience was shocked to witness three sledgehammer blows in the final movement. The heavy-sounding effects, each of which Mahler wanted to sound 'like a stroke of an axe', were meant to describe how fate felled the hero, i.e. himself, and mortally wounded him with the third blow.

Alma saw her husband as being in great emotional distress, without quite knowing why. She wrote: 'None of his works moved him so deeply [as did the Sixth Symphony].

When the rehearsal was over, he walked up and down in the artist's room, sobbing, wringing his hands, unable to control himself.'

Out of superstition, Mahler omitted the third blow in actual performances, although it remained in the scores. But that did not prevent life imitating art. Within a year of the premiere of the Tragic Symphony, as it was called, Mahler was to receive three blows from which he would never recover.

First he lost his job with the Vienna Opera, then Maria Anna died of, yes, scarlet fever, at the age of four. He was then diagnosed with a critical heart condition.

Devastated, Mahler was to live another four years, during which time he wrote some of his greatest music, about departures and death.

When he died, on May 18, 1911, mankind had yet to learn of the tragedy seemingly foretold in the composer's music, to be played out on the battlefields and in the labour camps and streets of the 20th century and beyond.