Well done on resisting temptation @Catscratch! You must feel very proud of yourself. And once you have resisted, it can make it easier to do so next time, especially if you remember how good you felt for not giving in.

I wish I could bottle that feeling you get after fasting well or resisting temptation - it would be so handy to be able to access it easily when your resolve is not so strong!!
There's lot of related discussion to "all or nothing" in various threads, I think many of us suffer from this. My maintenance goal for the last year has been to try to find a way to still have some of the less healthy foods but not to excess. I manage some days, but not others, and haven't really been able to pinpoint what makes the difference. Certainly the earlier in the day that I eat less healthy foods then the more likely I am to continue to do so. Keeping a record of what I eat does help - providing I do write it down!! - and the suggestion from SSure I think and others, which comes from an advocate in this area whom I can't recall, to always plan what you are going to eat - plans can be flexible - seems to work well. It helps with the mindful eating I think.
Anyway, very best wishes for your continuing weight loss journey.