Been through similar.
I was seeing a guy, we spoke one way or another every day for a good four or five months, and the last month or so, it had became romantic so we kissed n hung out a few times per week too. I was falling for him but we hadnt made it official so I didn't risk sex (learned from a prior mistake there).
Then at my cousins party (he was friends with my cuz) i walked in in him stroking some other girls leg. He was all over her the whole night and i was so hurt. I confronted him (took him asside, didnt make a scene) and he acted mad at me!
I fully expected at least a 'sorry I was wasted' bulshit text the next day. But nothing came. I just thought 'how could he be so cold?'. Eventually I bit the bullet n invited him for coffee. And actually found myself explaining to him why I was upset (!?!?) To which he just said 'OK'. And it all fell into place - he was a fake, cold hearted bastard.
Its all very well saying you weren't an item so he can do as he pleases. And yes that is true, but if he had any common decency he wouldn't have done it right in front of your face like that. Some people are just cruel.
I look back on that guy now and realise he didn't speak to me for hours each day ect... because he liked me. He did it because he needed me to like him. He was just a common variety narcissist.
Either way, the dude was a dick. And you deserve better. Don't let him back into your life. I know it sucks n you will feel really sad for a while. But at least you know now n not years from now when he was still stringing you along.
Hope you feel better soon!