In your case, there was a number of reasons why you fell for the wrong guy. As you say, you were feeling desperate after being alone for so long. That makes it hard not to want to jump at the idea that you might have finally found the one.
You also weren't helping yourself by getting involved with guys for a casual meeting/relationship when deep down you really wanted something more serious. If you were looking to find somebody who you wanted for a long term relationship, you would have most likely been focusing on the traits that are most important in a long term partner- such as loyalty and dependability. Since you were meeting somebody who was looking for something casual and fun, you were probably focused more on other traits-such as good looks, a carefree attitude, etc. Those are the same traits that make a guy likely to get involved with somebody else after you've only been away for a couple of weeks.
Also, you made things worse for yourself by being overly committed to him when you shouldn't have. There were problems and warning signs from early on. You should have been paying attention and asking yourself if this was the really right guy for you. Instead, you'd already made up your mind that regardless of who or what he was you would stick by him. Commitment has it's time and place in a relationship, but giving it out too freely makes it harder to walk away from somebody when you should.
Part of the reason you're going back to him now is because your mind is set in the idea that it's worth doing anything to keep him. It's hard to change that thinking when you've been stuck with it for so long. Another big part is that he was a large source of your fulfillment over this past year. You don't have anything else to offer you those same things, so you keep hoping you can still get it from him.
It's going to take time to get over him. The less contact you have, the sooner you'll get over him. You just have to keep reminding yourself over and over again that contacting him isn't worth it. Since you're on vacation right now, maybe you could leave your cell phone behind in the hotel room while you go out exploring. That way you can focus on the sights for a while without having the option of calling him. If you have his number on speed dial, you should get rid of that as well so it's harder to call him. You can also make a list of all the reasons why he's not worth speaking to anymore, then take it out and read it when you're tempted to call.
When you get back home, I'd suggest getting involved with hobbies and activities that will allow you to meet other people. When you have more friends life, then you won't feel as desperate, so you'll be less likely to end up in another bad relationships. Besides, meeting people through those avenues will increase your chances of finding a guy who's a good match for a long term relationship.
“This planet has - or rather had - a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movement of small green pieces of paper, which was odd because on the whole it wasn't the small green pieces of paper that were unhappy.” ― Douglas Adams, The Hitchhiker's Guide to the Galaxy