The root cause of your negative realtionship with food stems from childhood.
Think about how you saw food as a child, you were probably raised to look at it as a reward for 'Good behaviour' or for doing something 'well'. That pattern then carries into your adulthood, especially when something happens that is overwhelming or stressful, instead of resolving the issue you turn to food.
It's easy to say you should simply have more self-control, but how? when it's all you've known your life?
I struggle with this, so do most people I've come in contact with.
You need to figure out what is causing you to go into self-destructive mode? Is it work? relationship? friends? whatever it's, figure it out. Then ask yourself what is this situation that I'm currently in doing for me and my health long term.
It's not hard to stick to 'diet', the real problem has got fuck all to do with your 'diet', and it's got everything to do with how you respond stressful situations in your life.