Kesha performing at the iHeartRadio Music Festival, 2017.David Becker/Getty Images for iHeartMedia

Kesha's latest album "Rainbow" took fans and followers by storm. It snagged the number one spot on charts and was one of her best comebacks. Yet the journey to creating the album wasn't full of sunshine and rainbows in the slightest.

The extremely emotional legal battle against her producer Dr Luke whom she accused of sexual assault and battery, was all over the news. She had also, in turn, suffered a lawsuit for defamation and breach of contract.

Also read: Taylor Swift gives Kesha $250,000

In a recent interview with the Rolling Stone magazine, Kesha finally spoke up about the eating disorder she was battling and what inspired her to finally seek help. It had all started at a dinner party, where she was trying to eat, but felt anxious about her food at the same time.

"And I was like, 'Oh, my God, what if they walk outside and see this food in a bush? And I just had all this mounting anxiety," she said, adding that's exactly when she realized that it had become enough. "And then finally I was like, 'F--k. This. Sh-t. F--k this shit. I'm hungry!'

"And I am so anxious that I feel like I'm going to explode from all the secrets. All the secret times I'm pretending to eat or other times I'm purging, and I'm trying to not let anybody know. And I'm just f--king sick of this shit," she continued.

What followed was her meeting her mother at a gas station, as she told the magazine. She had then taken the step to check into a rehab and work with a proper nutritionist. The singer also recalls multiple instances of her breaking down about the pressure of looking a certain way.

"I just remember crying into a carbohydrate," she told Rolling Stone, "being like, 'I can't eat it. It's going to make me fat, and if I'm fat, I can't be a singer because pop stars can't eat food – they can't be fat.'"

The pressure to "be a certain size" was insurmountable. She also mentioned how "certain people" would shame her for wanting to eat. 

kesha and dr. luke
Singer Adam Lambert, Songwriters of the Year Max Martin and Lukasz 'Dr Luke Gottwald and singer Kesha pose onstage at the 28th Annual ASCAP Pop Music Awards at the Kodak Ballroom on April 27, 2011 in Los Angeles, CaliforniaKevin Winter/Getty Images

"I really just thought I wasn't supposed to eat food," she said. "And then if I ever did, I felt very ashamed, and I would make myself throw up because I'd think, 'Oh, my God, I can't believe I actually did that horrible thing. I'm so ashamed of myself because I don't deserve to eat food.'"

Kesha talks about "starving herself" and how she would feel "like a loser" throughout the duration of her recovery. Things turned for the better when a fellow musician seemingly blew her away with his take on her situation.

"Congratulations to you," was what she had been told by the artiste. Kesha told the magazine: "And I was like, 'For what?' And he was like, 'You just saved your f--king life.' And I just was blown away by that, because it made me look at the whole thing totally differently."

"Oh, wait. I did just take my life into my own hands and choose life over a slow, painful, shameful self-imposed death," she added. "And I need to stop just being so f--king mean to myself."

Kesha had also opened up about her new album serving as a lifesaver, on the Good Morning America show. "It's so personal," she said. "It talks about making it through, not giving up and finding empathy on the other side, which is incredibly hard sometimes."

"I think this record has quite literally saved my life," claims Kesha. "And I hope you guys like it and I hope you can hear it and I hope it helps people."

Here's one of the most popular tracks from the album for those who haven't come across it yet!