Lena Dunham has revealed that two years ago she checked herself into a mental health facility.

The essay from the “Girls” star published in the Sunday Times is a part of Scarlett Curtis’ book It’s Not OK To Be Blue (and Other Lies). Other celebs to contribute include Emma Thompson and Emilia Clarke.

RELATED: Lena Dunham On Her Decision To Move Out Of The Apartment She Shared With Ex Jack Antonoff: ‘Someone Had to Go’

“I was sick, skinny and addicted to pills. Even texts intimated me, and so I went off to treatment to face my pain,” Dunham wrote.

Although, she revealed therapy didn’t help at first to remove her writer’s block. “All day therapy, all night a blank computer screen,” she said. Luckily she added that her adopted brother Spike suggested art therapy, which was a breakthrough.

“If you can’t write it, draw it,” he told her.

By drawing her now ex-boyfriend Jack Antanoff, Dunham said she realized what needed to be done.

“On my overnight with my boyfriend at a local inn, I drew him sleeping on the bed after the final time we had sex, and as I sketched I realized I would drown alive if he didn’t let go of me, she said.

RELATED: Lena Dunham Celebrates Her 33rd Birthday With Brad Pitt: ‘It Was The Best Day Ever’

After five years together, the actress and musician ended their relationship in December 2017.

It’s Not OK To Be Blue (and Other Lies) hits shelves on Oct. 3 and includes a list from Emma Thompson of the 20 things she does to keep from becoming depressed and an essay from Emilia Clarke about her anxiety while undergoing brain surgery.