It's a natural impulse (so don't be too hard on yourself), but a dangerous one. When I worked on the substance abuse floor of a hospital, a guy sat in the parking lot drinking whiskey (so he wouldn't drink and drive) as a last Hurrah before admitting himself to inpatient treatment. He drank himself to a dangerous .3 blood alcohol level.
Sound crazy? Yep. And the food binges are too, because even on structured plan like Jenny Craig or Nutrisystem you will have days when you slip to one degree or another, and the same logic turns a slip into a humongous binge (I'll eat everything in sight until tomorrow morning, or monday morning, or the first of the month.....)
If you can learn a more balanced way of looking at food, in which nothing is evil or forbidden, and no single choice can destroy what you're working toward, you will find it a little easier to avoid self-destructive thoughts and behavior.