It sounds like you've had a hard life and a think a therapist would be really helpful to deal with the self esteem problems.... it can be hard to find a therapist that you relate well with so it might take trying a few different people.
I agree with Miguels mom and think you should talk with our GP about this, it could be something like BP or depression and you might need treatment.
Exercise does help, but often its not enough on its own, especially if you are thinking about hurting yourself.
Sending you lots of

s and wishing you all the best, keep on posting and let us know how you are coping. Writing posts on here can be a great way of processing how you are feeling.
Also try to get 8 hours of sleep each night, sleep is a big factor in BP.