Geeze, what a horrible loser. I wanna tell you to like, go burn his house down or something, because he deserves it, but then you'd go to jail, and that would suck. Loooser loser loser loser. Loser. LOOOSEEER. I can't stop saying it, it's like a loop in my head that turns on whenever this kind of stupidity appears before me. I'm sorry you wasted your time on this jerkface.
Don't feel bad for needing sleep aids though. It's hard to understand this kind of mindset if you've never experienced it before. I know that I used to think people who had to take medications or whatever because of emotional troubles were just overreacting or overmedicating, and then it happened to me and I couldn't sleep for like 3 days straight until a well-meaning friend finally made a midnight trip to a drugstore for some Tylenol PM. ;(
A huge emotional jolt like this one can throw your body chemistry way, way out of whack. What you're experiencing right now is generally called ruminating thoughts, where your brain focuses in on one thing and goes round and round with it, and in this case that one thing is traumatic. It's like one of those metal poles that has the volleyball on a string attached to the top, and it keeps going around and around and hitting you in the face on every pass. You may need sleep aids for a while. If it gets really bad, you may need to go on mood stabilizers for a few months to give your body a chance to stabilize itself. I hope it doesn't come to that, usually it has to be something really awful, like a family member dying, but you can't pick and choose what destroys you emotionally, unfortunately, even if logically you know it could be worse. The most important thing is to get yourself a good support network and cut him off completely. Do not answer his calls, no matter how tempted you are. Do not answer calls from unknown numbers (if it's important, they'll leave a message). Only answer calls from people you know aren't dealing with him.
I'm a very vindictive person, so I can't tell you to try to be the better one here. All I can say is that I hope someday you get your revenge, even if it's just by living well (which some people say is the best revenge anyway).