I am sorry you are having such a hard time. I also have a history of hurting myself. I carry around a list of questions and a help list to try and keep myself from doing it. Here my two lists:
1. Take a walk
2. Take an ice cold bath
3. Chat online or message board
4. Deep breathing
5. say to myself "I deeply and completely accept myself even though I hurt myself" (several times)
6. Squeeze Ice cube
7. Call someone
8. Snap wrist with rubber band
9. Curl up in bed (comfort zone)
Questions I ask myself
1. Why do I feel the need to hurt myself?
2. Have I been here before?
3. What have I done to ease discomfort?
4. How do I feel right now?
5. How will I feel when I am hurting myself?
6. How will I feel after I hurt myself?
7. Can I avoud the stressors or deal with them better in the future?
8. D I need to hurt myself?
Sometimes these help me, maybe they can help you. I know how hard it is - I deal with it alot. I try and think how people who care about me don't want me to hurt myself.