Accept it. You're human.
That means there is no "perfect" path to eating well. You start over every day, because every day brings a new set of challenges that can illicit a range of responses, depending on where you happen to be emotionally.
The more detached we are from what goes on around us, the clearer our choices. But that clarity fades during a day packed with lots of activity with little time to reflect. That's when our ego is usually in the driver's seat, and the foods with the greatest appeal will likely be those containing sugar, fat or salt.
When there's too much going on, or too much to process emotionally and mentally, we're in a state of stress which means our choices will be different than if we're relaxed. Worse yet is the increased mental chatter where we debate with ourselves how best to "fix" whatever situation we're facing.
It's how we live, driven by fear and guilt that if we don't solve the problems before us, it will reflect our own short-comings, or result in outcomes we don't want.
It's at those times that vinegar and salt potato chips never looked better, and a bag of them can be emptied in no time!
Our responsibility to ourselves and to everyone else lies in maintaining a relaxed state of mind. That's the "climate" where healthy choices thrive. Interestingly, the problems then take care of themselves, mainly because we can then view them differently!