I suggest you change your mindset from "diet" (ugh .... UGLY word :-( ..... to "healthy lifestyle" There are days that we ALL mess up a little - but what matters is that we pick ourselves up and get going on the healthy lifestyle again.
Imagine what our lives would be like if we ONLY ate healthy and ONLY ate within our ranges. Boring, boring, BORING.
When I was in weight-loss mode, I allowed myself one day per every two weeks to eat whatever I wanted, without regard to calories or balance. Sometimes that one day in two weeks ended up being one day in THREE weeks, but then occasionally it would be weekly. I still continued to lose steadily, and ended up reaching my goal. I have been maintaining for nearly 3 years, now, and the only thing I have changed is that instead of one day in two weeks, I now allow one day PER week. By allowing yourself, you are giving yourself permission, and therefore much less likely to beat yourself up or hate yourself for overdoing it on one day.