I know how tough it is when you know a partner will not cope if we leave them. However, it's wrong to stay in a relationship out of guilt. It's normal for a person to get really sad when they are dumped - so don't worry about that. But the self harming must be addressed with adult intervention.
End it firmly with no grey edges. No more messenger. Block her on other social media. If you're concerned about the self harming, then you MUST share the info about her harming with a trusted adult. Someone who has access to her and her family. If you're at the same school, a school counsellor would be ideal. When you've handed over the information, then you can get on with your life and someone else can help her heal.
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.