In her new memoir The Half of It, Madison Beer opens up about the 2014 nude photo leak that cast a dark shadow over her music career when she was just a teen.

In an exclusive excerpt obtained by People, Beer recalls when she, just 15 or 16 at the time, contemplated suicide after she was dropped by her music label, Island Def Jam, and nude photos and videos were leaked online.

"While negotiating the details of going independent was rocky, the emotional turmoil of being dropped was harder to work through. It wasn't just a bump in my career — it was a hit to my personal life, too. Coupled with the trauma of having my nudes leaked, it completely shattered the image I had of Los Angeles and the industry," Beer writes.

Content warning below: suicide

The singer continues that "on a particularly heavy day, I climbed over the edge of my balcony in LA and stood there, a million thoughts running through my head as I stared down at the ground, my eyes going in and out of focus."

"I don't think I would have jumped. It was more about knowing that I could — that I had a way out if it became too much. Still, I lingered there for a long while, chilled by the fact that I wasn't all that scared of being up so high," Beer writes.

READ MORE: Ed Sheeran Opens Up About Struggle With Eating Disorder

Beer recalls her younger brother found her on the balcony and shouted for their parents to come help.

"The thought of killing myself was so normal to me at that point that I had forgotten it wasn't something everyone pondered on a daily basis," Beer shares in the excerpt.

Since that moment, Beer says she has worked hard to move away from her "old" bubblegum pop image and become a strong, powerful role model for others.

"I hope by sharing my honest journey that perhaps someone that wanted to hide behind a keyboard to be mean or poke fun at someone else's expense thinks twice before they hit 'send.' I hope that we can find the strength to support each other and that we can work to treat others in the way we would want to be treated," the pop star told People.

The Half of It hits bookshelves April 25.

If you or someone you know needs help, please contact the National Suicide Prevention Lifeline at 1 800-273-TALK (8255).

Celebrities Who Opened Up About Mental Health

More From MIX 108