Even though it hurts like hell right now, you did the right thing. He only would have hurt you even more in the long run if you had stayed. I am sorry for your hurt but it will pass. It will take time though so be patient. You can't just turn your feelings for someone you have loved for that long off overnight.
Hang in there and remember, if you need support...you can always come here!