Sometimes the best thing for an INTP to do is simply drop it and wait. I've learned some things solve themselves and other things cease to matter. Patience is difficult, but a valuable thing to cultivate.
I agree. I keep books of crossword puzzles, Sudoku puzzles, things to read, etc., next to my bed. Failing that, my wife is a night owl and I can usually impose upon her to listen to me talk though things for a little while. But, patience is tremendously useful (when it's possible to implement).
What I have to do to put stressful things out of my mind in order to sleep: Read. Physical exhaustion is also good. But reading is best. If I clutter my mind with a billion other ideas for the ones nagging me like buzzing bluebottle flies I can usually drift off. True despair for me is a stressful situation and not a book in the house I haven't already read, and the library is closed.
I have found this about myself. I am a problem solver, I think most INTPs are. I tend to try to find solutions, even when there aren't any. Sometimes, of course, the problem is a feeling issue and not a thinking issue, and no amount of thinking will solve the problem. For the most part, I've learned to tell the difference. I find that feeling issues to be akin to digestive issues--if you mess with them, things get worse, if you leave them alone, even if they give you pain, they pass.
So, see if your SO is having trouble separating solvable from unsolvable problems. I have learned that when I'm over-thinking an unsolvable problem, I can solve a crossword or something and I get the sense of accomplishing something and that sense acts as a surrogate for the need to solve a problem, and then I can get to sleep. And, like a computer, sleep seems to serve as a reboot for me, and I wake up with my operating system afresh. (Usually.)
Dave