Before Mary Lambert found fame as a singer, she endured a living nightmare.

The 29-year-old year told People magazine Thursday she had been a victim of sexual abuse at the hands of her father, was raped by three men in an Army barracks, suffered from the pressures of coming out as “queer,” dealt with body dysmorphia, was diagnosed with bipolar disorder and had attempted suicide — all by the time she turned 18.

These days, Lambert is in a much better place. Lambert has relied on music to heal from her horrifying past and has found success after co-writing the Grammy-nominated hit song “Same Love” with Macklemore and Ryan Lewis.

However, Lambert admitted she could never really forget her tragic childhood.

“I was raised in a pretty abusive household,” Lambert told the magazine. “I was molested for much of my childhood… ongoing, repeated incest. After a certain point, I, as a coping mechanism, began to black out, and I became very detached from reality.”

Lambert added that after her father left, she began experiencing body dysmorphia at age 9. Then at 15, she was diagnosed with bipolar disorder.

“I know people have a genetic predisposition to mental illness, but I think a lot of mine was from the trauma I experienced,” she described.

According to People, Lambert sneaked into an Army barracks at age 16 “for fun.” However, she was then raped by three men.

“I don’t know that I ever got through it,” Lambert admitted. “I’m still unpacking it. One night can drastically change your life. It was just tragedy after tragedy. Everything just felt so heavy.”

Lambert relied on alcohol and self-harm to cope with her pain. At age 17, she attempted suicide.

“When you hate yourself that much, it feels like there’s no way out,” said Lambert.

Still, Lambert was determined to survive. One year after her suicide attempted, she headed off to Seattle from Washington State to study at Cornish College of the Arts. It was there where she truly discovered her passion for music, which saved her.

“I’ve rid myself of shame,” said Lambert. “The life that I live and the freedom that I have and the uninhibited joy that I feel, it’s so drastically different. I wish that gift for everybody.”

Lambert previously spoke about her trauma to Cosmopolitan in 2017. Lambert admitted to the magazine that as a child, she struggled to comprehend what had been done to her as a child.

“You don’t know what’s happening, especially when you’re raised in that environment and your brain is forming. There’s no sense of what normal is.”

As Lambert got older, she said it was difficult to cope with her then-undiagnosed bipolar disorder.

“I was really in extremes,” she recalled. “I would have the best day ever and then I would come home and I would want to die.”

And the sexual abuse she received from her father was then repeated by other men. The following year, she came out as a lesbian to her evangelical Christian church.

“When I was 16 I snuck into an Army barracks and I was gang-raped,” said Lambert. “You go into survival mode and go, ‘OK, how do I navigate this situation?’

“Everything hurt so much. The fact that I was abused by my dad. Was raped. Was gay. Was bipolar. Not to mention always being a big girl in the world. Just existing in those spaces, of like, I don’t feel at home in my body, I don’t feel at home in this world. What options do I have left?”

But Lambert marched forward. And she credited music for giving her a sense of purpose.

“Music, for me, was like survival,” she explained. “It was a form of healing, and almost like self-therapy. I’m so glad I didn’t die — I’m so glad that I’m alive, that I didn’t give in — but it wasn’t easy. I feel like there is this canned way we talk about trauma, this canned way we talk about suicide. … Real healing is s-----. It’s dirty and ugly and not easy.”