Totally agree with all that Srain said above, firstly, and most importantly, the part about my greatest empathy to you for this disturbing and distressing place you are in right now. I too view and experience suicidal ideation and self harming as being almost completely unrelated to each other. I've seen them defined as suicide being an attempt to die, while SH is an attempt to live, or rather, to survive seemingly unbearable emotions, feelings or urges.
For me, SH has been both an active problem and a controllable, though very distressing, urge,. intermittently throughout my latter childhood and adulthood. Its origins are complex and multi-layered, as I imagine is the case in most instances, and i've been working really hard with my T to try to uncover and understand the origin of this behaviour/urge which, quite frankly, scared and horrified me almost more than any other. Mostly, I do think it's about seeking some sort of release for unspent overwhelming negative emotion, or attempting in some way to convert and express the incomprehensible distress of emotional pain into the inherently more understandable and logical experience of physical pain.
I do think that working to understand, as much as possible, the causes and triggers of SH urges is important and something that should be managed therapeutically and very carefully. I also think that part of that process is about learning to recognize and accept the urges as a definitely undesireable and harmful, yet not critical or fatal, symptom of PTSD, and something that can be understood and managed as with any other symptom. There tends to be enormously destructive stigma, both by oneself and others, associated with SH and this can be as damaging and destructive as the urge or behaviour itself, so in that sense, knowledge is power in terms of understanding that this is, in some sense, normal of your experience.
I do hope you get some sleep and some respite tonight, I know all too well the distress and exhaustion that result when you cannot find this relief. Take good care.
Maddog