I have to wonder if you suffer from what I call the 'Grass is Greener' syndrome.
You broke up with your boyfriend of 3 years and I assume that this was because the relationship seemed unworkable. Your ex wasn't someone you wanted when you had him, but now that you don't have him he seems to be desirable; so does this other man that you met and he's suddenly great. It seems that you want men who you don't have and don't want the men you do have.
If you ask yourself how this problem connects to your history, I'm sure you will find the answer. I suspect that you yearned for a parent who was not available. Perhaps dad or mom was distant, cold or unloving. This type of early experience would prime you to choose partners who can't give you what you want. Soon you feel frustrated in the relationship and break up and start over with someone else; but the someone else will be no better than the someone who came before. Why?
Because I think you keep choosing people who can't give to you. This urge to replay the past by choosing partners who can't give to you is an unconscious attempt to relive your childhood wound and finally heal it. The fantasy being that somehow the partner who can't give you what you want will suddenly and magically be able to give to you.
If this happens, your psyche will feel that the early wound with your parent is finally healed. The wish to heal your early wound is the driving force behind your urge to return to your ex. You unconsciously hope that he'll be better to you this time around. But he won't because he's too much like the parents who let you down and didn't give to you in the first place.
The way out of your mess is to identify your wound and heal it. Ask yourself who let you down (mom? dad?) and in what way. Unearth all the memories of all the let downs that you suffered and allow yourself to feel all of your feelings. Next have imaginary dialogues with your parents and speak your heart, speak your pain, and speak your anger. Imagine your parents responding to you the way you needed them to do when you were young.
Also be sure to re-parent yourself by giving yourself the kind of self-talk and treatment that you needed as a child. As your wound heals, you will be ready to choose a partner who treats you well (or guide your current partner to treat you the way you deserve). This is the key to your relationship happiness and to the end of your searching for greener grass.