The problem with this "good" and "bad" idea or thinking about food and eating is that it leads to weight gain over time. You end up on that yo-yo cycle. Even if it is not a ton of weight, you gain and lose that amount over time and you simply train your body to weigh more.
I'm suggesting that instead of beating yourself up for "failing" again to stick to your diet or plan, you rejoice that you overdid it. You see, the key to eating success lies in our so-called "failures."