Hi Dan, I think Jim has covered this well. I think mindfulness meditation helped the most—not necessarily to sleep better, though I think that was a fringe benefit sometimes—but mostly on how to cope. Knowing that you just have to get through this moment. Yes, there will be tough moments in the future, but not every moment, and you learn to deal with them when they occur in the present moment only.
I also learned not to live in my thoughts or take them too seriously. Especially when you are exhausted and you’re not thinking straight. E.g., I learned there is a profound difference between:
1. “I can’t deal with this, if this keeps up, who knows, maybe I will just kill myself;”
and
2. “I’m having the thought that I can’t deal with this; I’m having the thought that if this keeps up, who knows, maybe I will just kill myself.”
Thoughts just pop up into your head, and they can get more convoluted when you’re really hammered from insomnia. Regardless how strong they seem, you don’t have to buy into them.
One caveat is that if you find you are in a black hole for days at a time, all the time, it is good to consult with a mental health professional to determine whether it’s just an understandable bummed out feeling or actual clinical depression, aka major depression. There is no shame in taking an antidepressant; insomnia is an understandable example of situational depression. The antidepressant might provide some short-term relief from insomnia, but it will help clinical depression over the long term.
And Martin addresses sleep anxiety, really a key component in all this.