Tell her not to ruin her life. You only get one life and you shouldn't mess it up. Explain to her that she's a great person, and the world needs great people. Don't allow her to destroy herself. If she doesn't listen, you need to tell a guidance counselor or other adult before her problem gets worse.
I would tell her parents or another trusted adult. Hang out with her and make plans to keep her mind of it and to keep her happy. She just needs someone to pick her up when she falls. Be that someone and be there for her. :)
First, you need to be there for her. I have depression, ocd, I self harmed, and I am becoming anorexic. What I need is someone who understands and who I can trust. Talk to her. Be there for her. Reply to every text-dont just say get help; that only made me worse. Make sure she doesn't! If she doesn't stop thinking about this you need to get help for her. Tell your parents what is going on and ask them what they think is the best option. Please be there for her! That is what she needs. She needs to talk about it. I know. It is the only way that works. Good luck :)