Sometimes when the pain levels are high it is hard to get beyond that. It is just you, your thoughts and the pain. I find this to be the most difficult of times because distraction techniques are hard to come by and thoughts are always dark ones. Often the worst time is at night I find.
There are times I don't even try to escape it all. I just blog it out. Get it out of my system. A journal works for this purpose as well. It is just that sometimes when you express yourself, just get it down it gives it less power over you.
There are other times only sleep will be the cure. However, sleep is a hard commodity to come by with high pain levels and insomnia.
Other times, if I can take it, I will write some fiction. Get myself out of that head space. Anything you can do to get yourself out of that mental head space is a good thing. Even if it is just listening to music you find soothing.
There will be days and nights when nothing works. When you are stuck in that acute pain that drives your mind into dark places. It is good that we remember... it will pass. When the pain lessens to acceptable and tolerable levels again we feel much more capable of coping with it. Just breathe and know it will end. Sleep will come and the next day could bring with it a more tolerable level of pain once more.