So Confused...

I’ll sum things up:

My ex-boyfriend and I dated for a few months. I broke up with him (because I got scared and am not good at relationships-immediately regretted it). We continued to hang out and sleep together. Less hanging out over the years (outside the bedroom) and much more sex, phone calls, many texts, etc. Then he came over and before we had sex he told me he was moving (temporarily for a job, I hope!). He was a bit distant and said this (sex) was the only thing we were good at and how I can now get over him. So out of the blue! I felt hurt, sad, confused, used, and just blindsided. I am letting him go right now and having no contact with him (but he’s done this before, where he called it off only to contact me two weeks later). I still really like him, but feel if he contacts me again I’d have to tell him that it’s either we are in a committed relationship again or just friends (and not sleep together!) That way I can have more peace of mind. I get the feeling he doesn’t want to get back together (do long distance) but then get other mixed signals. Thoughts? Advice?