I'm so sorry he hurt you. It sounds like it was just a short fling until he could get back with his ex, which wasn't fair to you. He's definitely right - he isn't worth it!
I had that happen to me YEARS ago. The guy I loved would hook up with me whenever he broke up with his girlfriend - and of course I put up with it because i loved him. He did this about 2 or 3 times -- I can't remember, it's been so long. LOL But finally, I'd had enough. It was just too hurtful and I couldn't go thru it any longer. So i didn't put up with it any more. But it broke my heart.
Of COURSE he just used me. There was no sex involved -- I was too young. These days it doesn't matter, but back then I was only 15 or 16.
You'll heal -- no one ever dies of a broken heart. You might feel like you will, or want to, but you won't.

You just have to keep yourself involved with friends, and activities. Don't isolate! That's the worst thing you can do. I know that's what you WANT to do, but don't do it. Get out, and do stuff. You'll soon find your heart healing my friend. God bless you and please take care. Any time you want to talk you're welcome to message me. Hugs, Lee