In familiar with that problem, not with my own child but I had a hard time at school, an unbelievably hard time, my best friends used to cut herself daily, usually with teenagers there's nothing you can say, I mean what teenager listens to there parents anyway? I agree if you tell her not to do it she'll probably do it in secret, instead encourage her to show her emotions in other ways e.g. Music, art, or maybe even take her to somewhere she can release her anger like paintballing.
If she does decide to talk to you, dont give an opinion even if what she's doing is wrong just be there to listen, her venting might help if she doesnt feel pressured.
If the cutting progresses I'd remove all sharp objects just for safety reasons. Especially shaving razors, Most teenagers use these to cut themselves in the bath because its painless while underwater and les intimidating than a knife. I'm sure this will pass.
Maybe making a new friend online that has the same problems or had the same issue with there friends turning on them would help her get through it, I know I felt completely alone when m friends tuned my entire year against me and I secretly took over 50 days off when my mum thought I was in school I'd sneek to the local park or town all day, and it ruined my education completely, so her taking to someone her he would be good.
I'm still a teenager so I'm quite familiar with this topic.
If you need any other advise feel free to email me.