It is really important that our goals are achievable and attainable. Set short term and long term goals with specifics. It'll help a lot.
I always try to keep in my mind that I am making changes to better myself, for myself, and that it's for the rest of my life. This has helped me more than anything when I don't get to exercise one day or go over my calories, or whatever.