I've gone through terrible bouts of insomnia related to OCD, and I understand what that can do to you. It's like quicksand...the harder you try to get out, the further you sink in. You're chronically sleep deprived, unable to think straight, irritable, and desperate. I know it all too well.
For what it's worth, there is a little lifesaver button on the mobile version of this app (the circle on the bottom right) that can be helpful when you feel like you're in crisis. I haven't tried it in a long time but I believe it guides you through some questions and gives some good advice. It's a good place to start if you have nothing else available to you, and the first thing I'd recommend.
Outside of that, this may or may not work for you, but here's my advice based on my personal experience:
Don't worry about ERP, don't worry about developing a regular meditation routine, don't worry about overhauling your diet, don't worry about getting enough exercise, don't worry about all of the little enhancements you should make to your bedtime habits...
All of those things are fantastic goals in the long run, but when you're at your wits end and your body is as exhausted as yours probably is, you don't need more things on your TODO list.
What you need is to find the simplest possible ways to detach from your thoughts and bring yourself into the present moment. This can be as simple as a 5 second pause. When you catch yourself doing compulsions, try pausing that compulsion for 5 seconds before you do it again, noticing what that "urge" feels like. When you're extremely angry about something, try pausing for 5 seconds to breath and notice what your body feels like. When you're desperately trying to sleep at night, try intentionally holding your eyes open and staying awake for 5 seconds, noticing what it feels like to "want" to sleep. You get the idea.
You may be surprised to find how much can change just by taking a few seconds to sit with your experience. Sometimes you may find that these 5 seconds quickly turn into 5 minutes. Those 5 minutes may turn into 15 minutes. And so on. In the case of your sleep, you may find that the less you try to sleep, the easier it actually comes. Funny world we live in, isn't it?
And sometimes maybe you won't even last for 3 seconds...and that's okay too.
Your goal right now is to learn that you don't really need to *do* anything to find peace. You don't have to change your life. The only thing you need to do is bring yourself into the present moment and accept that moment, along with all of its pain.
You may notice how a majority of the suffering is mental, and comes as a result of getting caught in the stories the mind adds on top of the physical discomfort.
If you aren't thinking straight, if your thoughts feel like an runaway train that's gone off the rails, then remember that you can hop off that train any time and watch the chaos from the sidelines.