I don't really have experience dealing with a breakup, but having OCD, I can tell you that it will try to exploit any weakness you might have. I can imagine that it could be harder for someone who has OCD to go through a breakup. At the same time, I think it's important you realize that your OCD is blowing your situation out of proportion. It's great that you're mindful of what is going on in your life, but don't hesitate to label the obsessing for what it is: OCD.
It sounds like your ex-boyfriend was a very important part of your life, and I'm sorry to see that you're going through a tough breakup. From what I can tell, you've spent quite a bit of time dwelling on it, which makes it harder to let go. At some point though, you have to decide to take care of yourself. This may seem selfish, but you must be #1 in your life. You'll do this for yourself, and for those who care about you. I know it's difficult, but it's important to let go and move forward. This is the "real" part of what you're dealing with.
You wrote that you're unable to stop yourself from talking to your ex-boyfriend in your mind. It really sounds to me like your OCD has latched on to this issue, and has exploited it. This has brought on mood swings, isolation, etc. This is something you do realize, but it needs to be labeled as OCD.
Have you ever been able to manage your OCD effectively? If not, I do recommend that you see a psychologist, and if necessary, a psychiatrist to prescribe medication. In the meantime, I would recommend that you read the following book: "Brain Lock: Free Yourself from Obsessive-Compulsive Behavior" by Jeffrey M. Schwartz, M.D. and Beverly Beyette. I've found this book to be very helpful in dealing with OCD.
You seem to be a bright girl with a lot going for her. Don't let a breakup damage you as a person. I can imagine that it's very tough emotionally, but that's where it should end. As for OCD, don't be afraid to face it. You'll feel anxious, and you'll probably second-guess yourself. But with hard work, patience and time, you can overcome it.