I remind myself that that type of thinking led me to bingeing, exercising for hours on end, injuring my foot, and ultimately a regain of all of my weight plus 10 more. I've been down that road and I don't like what's at the end of it.
What also helps me is planning out the days exercise and eating the night before. I commit to a certain amount of exercise and I fuel accordingly. If I plan a 3 mile run, I don't do 4 because I feel good or I ate too much. By the same token, if I schedule an appointment to exercise, I do it unless I'm hurting or something huge comes up.
One other thing is that I try to keep exercise separate from weight loss in my head. I exercise because I enjoy it and I eat to perform my best at it. Overeating may be offset by a couple extra miles run, but they won't be my best miles with a belly full of chicken wings and beer.
Hope that helps!