A quick tip I offer to my clients for those who struggle with dietary inconsistency.
Avoid consecutive "bad" days.
Days when you don't feel particularly "on plan" or delighted with the choices you have made or have been forced to make with lack of planing or life just throwing shit your way.
Get a calendar, once a day, ask yourself objectively "how solid was my day with respect to helping me achieve my goals?"
If it was good, in your opinion, circle the day and if it was poor cross it.
Don't let yourself have two crossed days in a row. If you find this really tough, reassess your goals and your lifestyle, if they are in constant conflict then somethings got to give.
Life is unexpected you can't be so hard on yourself that every single day, forever you need to be 100% on point, its just not doable. That being said if you are too lackadaisical in your self control then you may not really be too happy in the long run with how you are achieving.