Do you have any abandonment issues?
The only reason I ask is because a lot of times when we have been in a past relationship where we develop a strong attachement to the other person and then that person up and leaves, or hurts us in some unfathomable way it can leave a deep wound that takes a long time to heal.
In many cases where this has happened you will often find yourself having a hard time allowing yourself to get close to a new person, or when you do, you will instinctively pull away or self sabotage to 'protect' yourself. It's like beating them to the punch-- you kill the relationship so that you don't have to relive or remember the trauma from the past.
I don't think you want yourself to be miserable. I don't think anyone truly wants to be miserable.
The other thing that comes to mind is that maybe both of these relationships were simply not the 'right' ones. And when you jumped out of the first for the second and then realised the second wasn't everything you hoped it to be you reverted to wanting the first relationship. In this scenario, it would seem to me that maybe there might be some wisdom in stepping back, and doing an evaluation with yourself about what you are looking for and wanting from a relationship-- the type of characteristics you want in a partner and how you want to be able to feel in that relationship. Do this evaluation completely in isolation of any previous relationships. The goal is not to compare and contract but to create and define a relationship completely brand new and from the ground up using your own constraints.
There are plenty of fish in the sea. Spend some time with yourself, learn to love your self and understand yourself and this will help you know what kind of bait you need to rig your line with.