Music is music whether composed by angels or monsters. Alma Mahler was a monster, no doubt, but she was a very intriguing monster. She outlived Gustav Mahler by 50 years, destroying all but one of her letters to him, and suppressing or falsifying many of his to her for fear of being judged too harshly by posterity. None of the music she chose for her funeral was by Mahler.

Pathological cruelty, antisemitism, vanity and a sense that the world owed Alma Maria Schindler something in token for her brilliance and beauty were some of the traits her admirers and enemies alike recognised in Alma, traits also shared by her hero, Richard Wagner. Like him, she was a passionate follower of Nietzsche. Her marriages – to Gustav Mahler, Walter Gropius and Franz Werfel – and her many relationships, including those with Gustav Klimt (who gave her her first kiss, at 17), her composition teacher Alexander Zemlinsky (her first lover) and painter Oskar Kokoshka (perhaps the only man she really loved), have made her one of the 20th century's most famous muses and femmes fatales.

Born in 1878, Alma had a privileged yet troubled upbringing in hedonistic Vienna. Her father, Emil Schindler, read her Goethe. An older admirer sent her crates filled with classics including Stendhal and Ibsen. She must have been an enchanting dinner guest: her deafness in one ear forced her to lean into conversations, ensuring maximum attention and intimacy. Siegfried Lipiner, one of Mahler's favourite intellectual adversaries, with whom the young Alma discussed Plato's Symposium, might have empathised with her liking for Nietzsche, but he found her "spiteful, vain and overbearing ... lacking in warmth, devoid of naturalness, sincerity and good sense".

Her many admirers, however, felt understood, valued, and were deeply affected and emotionally sustained by her energy and commitment to them. This was total, until she had had enough, which always happened.

She was a woman who needed to be surrounded by creative genius, and the young Alma Schindler married Gustav Mahler in 1902 when she was 22, already pregnant with their first child. He, 19 years her senior, idolised her. She greatly admired him, the eminent conductor of the Hofoper (Court Opera), but she was never really a fan of his music, the sixth and seventh symphonies and Das Lied von der Erde excepted. She was attracted to his enormous energy, dynamism and childlike innocence, but it doesn't seem that she was ever "in love" with him.

Speaking near the end of her life to writer Elias Canetti (who met her when he was involved with her daughter, Anna), she described Gropius, her second husband as "the true Aryan type. The only man who was racially suited to me. All the others who fell in love with me were little Jews. Like Mahler. I go for both kinds."

In the astonishing, protracted prenuptial letter Mahler sent to Alma, he suggested that were she ugly, men would not care for her intellect and artistic talent.

Her own composing, meanwhile, was at Mahler's insistence, disregarded. "The role of composer, the worker's role, falls to me, yours is that of a loving companion and understanding partner … I'm asking a very great deal – and I can and may do so because I know what I have to give and will give in exchange." Astonishingly, Alma capitulated. She became his amanuensis and offered him the most conscientious support. However, later on, this monstrous ban on her composing created insurmountable problems. "I sit down at the piano, dying to play, but musical notation no longer means anything to me. My eyes have forgotten how to read it. I have been firmly taken by the arm and led away from myself. And I long to return to where I was."

Life with Mahler was dispiriting for a woman used to a glittering social life. Their days were regulated like clockwork. For 10 months of the year, Alma was expected to fetch her husband from the Hofoper almost every evening, whether he was conducting or not, whether she was pregnant or not, and on foot. Then the Mahlers and their two children would decamp to Toblach on the Italian/Austrian border for the summer, where he spent his time composing.

Alma's first child Maria, known as Putzi, was a breech birth. She wrote these desperate words five weeks later, "I have been ill for a long time. But for several days and nights I have been weaving music in my mind, so loud and persistent ... Gustav lives his life, and I too must live his life. My child doesn't need me. In any case, I can't keep myself solely busy with that."

Her complicity in suppressing her composing career does seem to us today truly dreadful. But remember this was a time when there simply was no other woman in Vienna (or almost anywhere else) doing anything comparable. Feminism, or anything like it, was non-existent in Europe circa 1900. In 1903, Otto Weininger, a young Viennese philosopher much admired by the likes of Freud, published Sex and Character, which posited the belief, current at the time, that "lustful woman" diverted man from intellectual preoccupations. "It is enough," he wrote, "to make the general statement that there is not a single woman in the history of thought, not even the most manlike, who can be truthfully compared with men of fifth or sixth-rate genius."

At the crisis point in the Mahler's marriage, the three hammer blows as he called them – Alma's affair with the young architect Walter Gropius, the death of their five-year-old daughter and the discovery of his heart defect – Mahler was advised by none other than Sigmund Freud to encourage his wife to return to composing. Mahler entreated Alma to review her songs, even editing and publishing them for her, meanwhile berating himself for his selfishness. Given the maddened state of his mind when he revised them, no doubt exacerbated by his tacit compliance with the ongoing affair, it is impossible to imagine what he actually altered.

Only 14 of Alma's lieder compositions survive today, though they were never dated, one assumes they were early songs. After Mahler's death, as far as we know, Alma didn't return to composing, nor did she discuss any other works she may have written, despite publishing her songs. She claimed to have lost the will to create anything new, having been sucked dry from living and working with such a demanding and neurotic genius.

To my ear, these songs – seven of which I will be singing with the London Symphony Orchestra on Sunday – show that she has the rare gift of melody. The structure is often in strophic form, and has a Brahmsian weight of purpose and resolve, but her harmonic language is formed from the influences of her teacher Zemlinsky, and of Arnold Schoenberg and Alban Berg (with whom, later on, she also had affairs).

The music is in part voluptuous, coquettish, Wagnerian in intensity and harmony, yet intimate, sensual, charming and surprising. Among the poets whose texts she chose to set were Richard Dehmel and Rainer Maria Rilke. They expressed a visceral, sensual empathy with nature, magnifying emotions, yet they were also suspenseful, remote and ghostly. There is often a sexual charge to Dehmel's poetry, which must have seemed perverse at the time.

Alma's word painting is delicate, sensual and beautiful, as is the piano writing, although I'll be performing versions orchestrated by Colin and David Matthews. Technically her pieces are not at all easy to sing; the harmonic twists and turns present challenges not just for the singer but also the listener, and the range can be dramatic.

Perhaps it's the only real thing we have of hers. Her voice in her diaries and presence in Mahler's letters are famously – notoriously – unreliable (google "The Alma Problem" – it's fascinating reading). She doctored or deliberately falsified letters and her diaries before their publication many years later, presenting the version of herself she wanted people to see. Didn't she think people might do a bit of cross-referencing? Tom Lehrer in his divine song, Alma, seems to have it right: "She gave of her time but not of herself."

Would I have wanted to meet her? I think I would have been afraid of her potential cruelty and overawed by her associations. I'd rather raise a glass to her from the other side of the room in recognition of that 20th-century phenomenon, the celebrity.

Sarah Connolly performs songs by Alma Mahler at the Barbican on Sunday. Box office: 020-7638 8891.