I'm not sure if you should get back with your ex but you definitely need to make up your mind.
Are you sure you're not just obsessing over your past boyfriend or only remembering the good times? It is very easy to forget about the bad times after you leave someone, which is what often causes people to get back together. Try to remember why you broke up with him to begin with - if he broke up with you - remember that and stop damaging future relationships over someone that just isn't right for you.
There are times when everyone wants their ex back, for one reason or another, but, for me at least, when I think about why I ended the relationship I don't think twice about wanting to go back.