I don't know how much you've done so far, so forgive me if you've tried these things already.
Get yourself talking to people. If you can, ideally you'd want to see a therapist. Are you on meds? If not, you may want to consider, because they can really help you cope sometimes.
If neither of those appeal, you should really have at least one friend you can talk to about this. At the very least they can make sure you're safe if you won't. Being safe is the number one priority.
As a last resort, if you really feel like you won't be able to control yourself, get yourself to a hospital, because they can keep you safe there. It's not pleasant, but better unpleasant and alive than the alternative.
Hang in there, keep trying to distract yourself, and if you need, there are a lot of friendly folks around here like myself (and a lot of 'em far more qualified than myself to help with these things ^_^") who will be more than happy to talk to you
Hope I helped some! Take care of yourself
~TheDeliciousDish