I'm sorry to hear you're going through a rough time.
Is there anybody that you trust that you can talk to about this? Parents, good friends, a therapist, etc. It sounds like you might benefit from some counselling to sort through your issues.
It might also be good to try distracting yourself when you get these thoughts to self-harm. Are there any activities you enjoy doing that you could distract yourself with? For example, whenever I'm feeling like hurting myself, I like to take walks, hang out with friends or family, and watch comedy tv shows.
Sending you safe hugs, and I hope you are feeling better soon.

