The one thing that is almost certain in dieting is falling off plan. Whether it is by choice or out of our control, deviations will happen and, unfortunately, this is where a diet is either successful or if it fails completely.
I love using this phase - CORRECT AND CONTINUE. I use it often when things don't go according to a client's plan. I even use it on myself.
It means: Cut your loses, have no guilt about it (because it happened and you can't go back in time to reverse it), don't dwell on it, and get right back on plan. We have every hour in the day to make that choice with very little consequence to our overall goals. The ones that understand this and execute it make it to the finish line.
Failing to prepare for these little miscues builds unrealistic expectations in dieting as a whole especially if you've never successfully dieted before. Accept that these deviations will, more than likely, happen and navigate your way right through it.
Don't allow your 1 moment of indulgence turn into a months and months of ravenous eating. Giving up on your goal because of one setback is like slashing your other 3 tires because you got a flat.