I don't know as I have much of anything to offer you in the way of suggestions for helping your friend.
But I noticed no one had replied to your post so I thought I would.
Personally I doubt there's much you can do beyond what you've already done. You've expressed your concern for your friend. And you've offered to be there for her any time she want to talk or needs support.
Beyond that, what your friend probably needs is professional help. Hopefully she's receiving that. (If not perhaps you could offer to go with her to talk to someone so that she could get the help she needs... just a thought.)
Self harm is typically not considered to be a precursor to attempted suicide. Of course, if you got the impression your friend was becoming suicidal, you'd want to share that with someone... a family member, a staff member at your school, etc.
Here are links to some articles on the subject of self harm from PsychCentral's archives. Perhaps some of the information in them may be of help... both to you & your friend. (You might consider sharing them with your friend if you feel comfortable doing so.)
https://blogs.psychcentral.com/embra...ths-the-facts/
https://psychcentral.com/blog/video-...ury-self-harm/
https://psychcentral.com/ask-the-the...for-self-harm/
Thanks for caring... & please take care of yourself too...