If you don't want to read it all, please just offer advice regarding the title.

I have a friend, we'll call her X. X is a friend of mine who lives far away. She takes meds and sees a psychiatrist, has a horribly abusive home life, few to no irl friends, no other siblings or other family, and school doesn't appear to be a safe place either. She recently relapsed on self harm, reason yet unknown, at school in the bathroom, after (I think) a couple months of not doing it. X and I mutually agreed not to kill ourselves while the other is around, and she said she won't harm herself when I asked her not to (a couple months ago), but she went back to school at the start of the week after a long absence, and on Thursday she couldn't hold it in. I don't know how bad it is yet, but in own words from two months ago: "Once I start cutting, I can't stop, and it scares me..."

I have no experience with SH or handling it; what am I to do? How can i help her? I am of course doing everything I already know to with depression: I'm always open and available for her, I give her space when she isn't feeling well (sometimes days), I always check in, share pictures/occasional updates/cute stuff, I make sure to keep my own problems/depressive topics to myself, I try to give and remind her things to look forward to/live life for, I respect her space and don't push or pry deeper than she is willing to tell me, I let her know I'd do anything to help her if she'd ask, reassure her that she is never and could never be a bother to me, that I want her problems to be my problems, too, and that we'll get through things together, I tell her how proud I am that she's trying so hard not to SH, that to me, she's perfect the way she is even if she or others don't think so, and I frequently let her know how important she is and that she is loved and cared for and that someday she'll finally be free from her current torment-----but I don't know what to do beyond that.

I'd never say something I don't fully, truly mean, I don't spout baseless optimism, and I do everything I can to reassure her that we'll get through things together and someday these bad days will be behind her. If there's anything else I can do to help, or if I'm maybe handling something wrong, please help me help her.