When I interact with my clients I am always interested in why some have lost the weight and kept it off as compared to others who never quite make the changes that they were hoping for.
After some digging I've found that the successful "losers" have a deep conviction for getting the fat off. Their's is a specific reason which they tackle head on. They realize that hard work and sacrifice will have to be put in, but with a strong "why" the obstacles are simply stepping stones towards their goal.
On the other hand, I can't remember a client who ever just lost weight "for the heck of it".
Don't make this a hard or complicated psychology assignment. Simply take some time and "meditate" on why you really want/need to lose weight. Write it down somewhere. If you need to, post it where you can review it. I prefer that it becomes stuck in your gut.
Each time you feel like eating bad, or skipping your training, just remember your why, and stay on track.