"Failure" is not in falling down, or making mistakes, or in actions we regret, but in giving up. You haven't done that, Shelli D. If you put the whole thing in a different perspective, you're doing better than average. Or use another habit (other than food) as an example of what you're trying to accomplish. If you want to stop chewing your fingernails, you can count on at least six weeks of mindfulness, and in that six weeks, you will chew your nails. Possibly right off. But they grow back, and you learn to keep your hands busy and your fingers out of your mouth. lol
Don't confuse set backs with failure. You're right that we can't just give up food, but the mindfulness we need is the new habit we want to cultivate. And next time those "f'd up already, might as well do x, y, or z" thoughts happen, you'll have that mindfulness a little quicker, and that little longer willpower. Maybe enough even to get yourself to somewhere or someone who can distract you from the action of the old habits.
You can do it. In fact, you already are. Go, you!
CE