Former '90210' star AnnaLynne McCord is opening up about a dark part of her past in an effort to tell women everywhere: "You have a voice."

In an essay in July's issue of Cosmopolitan, McCord revealed that she was assaulted by a male friend at the age of 18 shortly after moving to Los Angeles. "Over the next few months, I began to go dark," she confesses. "My friends would invite me to events where the guy would be, and I would stay away. Then one night, I did go to a club with friends, and I saw him there. We made eye contact and I felt like throwing up. I turned and ran, sprinting into traffic."

She goes on to reveal that she kept quiet about the incident until she finally broke down and told her friends and former boyfriend the truth, to which she says, "[It] would take an outright breakdown to truly turn things around."

While shooting '90210,' McCord admits that the darkness took over her and she almost attempted suicide. "I called my sister Angel; I called my dad. No answer. I got ready to swallow the pills and suddenly heard myself screaming, 'Stop!'"

McCord writes that she worked with a therapist and a woman named Somaly Mam who rescues victims of sexual assault in Cambodia as part of her road to recovery. Her story is part of her mission to help encourage women who are victims of assault to stand up and be strong. "I have my message for women and girls: You have a voice. Don't put yourself in a box."

To read more about McCord's powerful story, click here for the full essay.

More From PopCrush