Much has been said about the right food and how important it is to move yourself. All true.
For me, one point that kept me going, was that I do stuff, that I can measure. I had an excelsheet diary, in which I tracked my weight every day (same time), I kept my food, I kept my activity, and I had a comment section, well for comments if the day had any twists (parties, and stuff like that). After a while, I saw my progress by numbers, and my excelsheet looked awesome, due to a Trafficlight rating system for my calorie intake, and some nice charts for weightloss and stuff like that. Play with it!
When hard days come, and they come, you just have to think how crappy your charts would look like the next day. Well helped me, maybe it can help you. Either way, keep it up man! Master your will!