I'm kinda in the same boat as james. I feel you man, I really do. And don't take that the wrong way
Thing is with me though: on the one side I don't WANT to stop thinking about her, its like one of the few things that keep me entertained. On the other hand, it does distract me. When school's starting officially for me next week, I'm most likely going to have a very busy, but boring life. School -> homework -> food -> work/gym -> homework -> food -> sleep. Rinse and repeat.
Going to the gym is atm the only thing I really enjoy. Hell, I'm getting bored behind my pc nowadays. Thinking about that girl just gives me pleasure, even though its distracting. And that's where the problem lies: its distracting. I can easily space out for a few minutes just thinking about her. In class. Doing homework, or whatever.
It ain't the first time something like this has happened to me. It has happened to me around twice more. First time it lasted around 1.5 years

Second time just a few months. Current one is already going for 1 year...
I know how not to think of her, but I don't want to. It's very... annoying

Just wanted to get this out of the system
