What has worked for me is celebrating a bunch of non-scale related things on a daily basis. The positive experience (because of all the feel goods of meeting goals on a daily basis) makes everything a lot easier to stick too because it's happy thing instead of focusing on failures.
It's little stuff like did I stick to my meal plan? Did I resist eating something tempting but that wouldn't have been worth it? Did I get my exercise in? Did I log everything I ate (even if it was off plan)? Even the stuff scale related.. not gaining is still a win
Every one of the goals I meet is a little feel good feeling. I don't reward myself with anything really tangible, just feel good warm fuzzies. I don't let my thoughts linger on the goals I didn't meet at all. Purely focus on what I did well. I have a lot to lose, over 50 pounds, and I lose at a rate of about 1lb per week. If I looked at the overall picture, without any sort of stalls or weeks where I didn't lose it's gonna take me around 2 years. Thinking about that can be depressing.. so I don't. This is a lifestyle change afterall, length of time shouldn't matter in the end.
Hope that helps at least a little.