Absolutely! Humans want what they can't have. I think your obsession is simply that, you just want him because you can't have him. Your regret after breaking up with him could be a subconscious thought that you're going to be alone for the rest of your life. I think this happens with a lot of things, like cars for example. When you lose your car in an accident or whatnot you feel some type of hopelessness, that you'll never be able to get something as good as what you lost. But obviously this isn't true and despite knowing it you still think about what you lost and desire it, or in your case obsess.
I think you'll immediately lose your obsession once you start dating someone else.
This is just my opinion though, I'm not an expert on psychology.
BTW, welcome to the forums!