As was already mentioned, the best thing to do is distract yourself with another obsession or something of interest during the times of intense obsession. I know, it's hard... But you end up just pacing back and forth, constantly thinking about her and looking at your phone every 10 seconds if you don't find another interest to distract you.
I am exactly the same way, much more so when I was younger. So I completely understand. I remember once in early college my girlfriend went to a party, and I of course, didn't want to go. I literally could do nothing but think about her, wait for texts, and await her arrival. I basically paced for 5 hours running thoughts through my head. There was no need for this, we were in a close, happy relationship, but I couldn't help but obsess.
The story was similar almost every time we were apart. I just had to learn to stop driving myself insane and focus on other things.
_________________
"If the lessons of history teach us anything it is that nobody learns the lessons that history teaches us."