How do I get over my stupid mistake?

I was a stupid 24 year old girl with not much experience and completely fell for this guy. He wasn't very nice as he would drop me so easily when someone he thought was "better" that cane along and he would give excuses that I can only text him once weekly. Then he comes back every time when the girl doesn't work out. He just recently messaged me talking about a TV programme but I only gave him one word response and completely stopped replying to him.

Why did he not value me as a person I'm not ugly at all, very slim figure and has a good job not only that I treat people with respect
How do I get over my stupid mistake?
Post Opinion