Someone who harms themselves is making a choice to do so. It is common for them not to take responsibility for it, to say that stress or depression or feel numb or still something else drove them to do it, but in the end it's a choice they make, not one somebody else makes for them. If your girlfriend were to harm herself after your break-up, that does not fall on your shoulders; that is her choice, independent of anything you did or could do.
Your girlfriend may feel for you what she thinks is love, and it is certainly possible she does love you very much. But that love is shadowed by something else much more powerful, and that's dependency. Your girlfriend feels she literally needs you to be happy. I suspect because she has such low self-worth she relies on you to fill her up, make her whole, and tell her she's something special, because she doesn't believe it. Just as much as she loves you, she's afraid of losing you because her drug of choice, you, will no longer be there, and the emptiness will come back to haunt her.
I say this because I've been through it. I was in your girlfriends shoes. And I did the same thing she's doing to you to my partners (although not with threats, just with actions). I've been there, and that's how I can say that it is a choice she is making.
You cannot stay with her because she threatens you. That is not a real relationship; that is a hostage situation. And you do not deserve that. You don't deserve to live in constant fear that she will harm herself. Eventually, it will most likely bring you down as well.
My suggestion is to let go, gently, but firmly. Let her know that the relationship is damaging and not healthy, and you can no longer be in it for your own sake. Let her know that, at this point, you are unable to help her. If you can, try and arrange some support for her before you break it off. If you think you can stay distanced enough but still be friends, do so, but if you have any doubts, you should cut things off completely. Let her know that your dearest hope is for her to get help, because you believe she can get better, and because you know that she has good inside her, even if she can see it. But that you can no longer be her pillar.
I wish you good luck. Feel free to
PM me if you ever need anything.