Demi Lovato. (Courtesy)

Demi Lovato bravely told fans she was sexually assaulted and left "for dead" on the night she overdosed.

Ahead of the release of her four-part series called Demi Lovato: Dancing With The Devil, new details have emerged about the night that changed her life forever.

The singer, 28, explained how a drug dealer who provided her with heroin on the night of her overdose in 2018, also sexually assaulted her before leaving her "for dead".

In the upcoming documentary, she says: "I didn’t just overdose. I was taken advantage of.

"When they found me, I was naked, blue. I was literally left for dead after he took advantage of me.

Demi Lovato speaks openly about her past traumas in a revealing four-part documentary.

ALSO READ: Demi Lovato to tackle past traumas in her new documentary Dancing with the Devil

"When I woke up in the hospital, they asked if we had had consensual sex. There was one flash that I had of him on top of me. I saw that flash and I said yes.

"It wasn’t until a month after the overdose that I realised, 'You weren’t in any state of mind to make a consensual decision.'"

Elsewhere in the documentary, Demi revealed she had three strokes, a heart attack and brain damage.

It took two months for her to recover enough of her vision to be able to read a book.

The documentary is Demi's second YouTube docuseries and producers say fans will be "granted unprecedented access" to the singer's recovery as well as her career over the last three years.

Demi goes on to reveal how she believes she "dodged a bullet" when she called off her engagement with ex Max Ehrlich - who was not connected to the supply of drugs that caused her overdose - last September.

Demi Lovato thinks she "dodged a bullet" by breaking up with Max Ehrlich.

She said: "I feel like I dodged a bullet because I wouldn’t have been living my truth for the rest of my life had I confined myself into that box of heteronormativity and monogamy.

ALSO READ: Demi Lovato's ex-fiancé Max Ehrich says she didn't tell him they'd split

"And it took getting that close to shake me up and be like, wow, you really got to live your life for who you really are."

The former Disney Channel actress also opened up about her friendship with Ariana Grande and how the Thank U, Next singer helped her to sign with manager Scooter Braun after her overdose.

Last year she thanked fans for their patience while she sorted personal issues in her life.

She said she had "kept my mouth shut, while the tabloids have run wild".

Demi Lovato: Dancing With The Devil is set to premiere its first two episodes on YouTube on March 23rd.