I have several ways of dealing with the long haul.
One is this thought: time will pass either way, whether I'm losing weight or not. Better to spend it losing weight, no matter how slowly, than being utterly mindless and gaining.
A related thought is that the older I get, the more telescoped time becomes. A year seems to go by in the blink of an eye. I started my current job two years ago and it still feels like my "new job". So if it takes me another year or two to reach my goal (whatever that is), I know that I'll look back and be amazed how quickly the time went by.
Finally, I have been learning to live in the moment more - instead of thinking thoughts like "ugh, I won't be able to eat such-and-such ever again," I focus on making the right choice
now, in this moment, every time I am faced with a choice. That transforms the process from being a "long haul" to being a matter of doing the best I can right now, a much more manageable, less daunting proposition.
As to whether it's working, only time will tell. But here is what time has told so far: I've been at it for a year and half - longer than I've ever stuck with a plan before - and I've lost 75 pounds. So for me, these ways of thinking seem to be doing the trick, so far.