This comes from someone in the mental health field, so pardon my slightly clinical angle here. I too have fallen off the wagon many times, after months of really good habits. I figured this time, why not apply what I do with clients to myself.
I recently have tried to apply some cognitive therapy to myself, meaning that I identify triggers, high-risk situations, and (for me) most importantly the irrational thoughts that lead to my downfalls. I am going to concentrate on the irrational thoughts in this post, because many of us know our triggers and when we are likely to encounter them already.
I have to accept that, yes, I make irrational decisions because because my brain manufactures these irrational thoughts in much the same way that an addict's brain does for their drug of choice. The brain designs these very strong and pointed thoughts because it wants to feel good NOW, and would easily choose to feel great for the 1-10 minutes as the taste buds send powerful messages to the brain that it should experience ecstasy (the feeling not the drug). The part of the brain that inspires these irrational thoughts is very primitive and only cares about feeling good in the extreme short term, it simply is not designed to consider long-term consequences so it won't - period. It's the same as the crack addict who time after time says "this is it, this is ruining every aspect of my life" but chooses again and again to restart their addiction.
Anyway, here are some of my irrational thoughts, and thoughts I have to manually choose to replace them with when they come. Knowing that these thoughts are coming helps me, and with practice replacing them becomes easier.
1. I can have just one piece of birthday cake. Replace with: Yes I want that birthday cake, but experience has shown me that afterward I will feel awful, will crave more, and may throw away my WOE for a long long time. I might get away with it a few times, but eventually this type of choosing causing me to give up everything I've gained. So I must choose "no" now - and every time - to avoid that game of Russian roulette. (And just as in Russian Roulette, my life is truly in danger.)
2. I deserve to taste this wonderful-tasting food. Replace with: I can have this food but it is not so wonderful, because I really don't want obesity, diabetes, shameful feelings, shorter life, and heart attacks that go with it. If I choose the food, I choose these things at the same time. No getting around it.
3. I will look like an outcast if I don't eat what everyone else is eating. Replace with: I will chose to do what is best for me. I may feel weird in this social situation, but it is not the end of the world and it will be over in a few hours at most. There is no chance that someone will kill me because I chose not to eat that stuff.
4. I just had something with too many carbs, I might as well just binge right now and get back on track tomorrow. Replace with: WARNING! I just ate something that I shouldn't have eaten; if I don't get right on track right this second I will end up farther and farther from my goals with every passing minute. [This one is like the driver that misses his exit and figures he might as well just keep on driving - we obviously wouldn't do this because it is irrational! Make the U-Turn as soon as it is safe and legal to do so, which is right now!]
5. I've been stuck at this weight for weeks. I might as well just eat what I want since this isn't working. Replace with: I knew before I started that plateaus are part of weight loss, and I am experiencing something that I knew was going to happen so I shouldn't be surprised. Instead, I will stay the course or try to change things in my plan that are still consistent with my plan, like upping my fat, changing my workout routine, or giving my scale to a friend (along with $20 that he gets to keep if he doesn't give my scale back until the date I specified.)
6. This persons' feelings will be hurt if I don't eat this. Replace with: This person can choose to feel hurt or not because I do not want to eat their food; their feelings really have nothing to do with my choice to be healthy. The irrationality is theirs, not mine.
These are just some ideas, they may or may not work for you. Maybe they will work for somebody. I've only been trying these approaches a few weeks, but it is nice when a craving occurs to be able to identify the thought that my brain makes to try to get me to do what it wants, and to already know how to combat that thought with one that is more useful and rational. Anyway, it gives me a sense of power to be approaching this with a different plan after several really valiant attempts (as long as 6 months) have eventually failed.
Good luck on your WOE!