There is so much to say, and so little time and space to say it, and read it. Here's the basic paradigm.
When you decide to go on a diet, it works for a couple of weeks, then you find you're unfairly passed over for a promotion, that makes you feel so defeated that you react by overeating. Then you say to yourself something like, "You see, Ms. Glutton, there is NO WAY you can lose weight. Just give up now!"
Only those who knew me in my early twenties know that during those years my weight was around what it would be much later, when I was nine months pregnant. I've now been at my ideal weight for many years, and I maintain that with no effort at all, just care with my health habits.
I'm painfully aware of what it's like to "feel like a failure."
The truth is, you've got a unhealthy habit. The first step is to recognize that.
This habit has formed strong neural pathway in your brain, so certain events can trigger a reaction that you follow without being aware of it.
What you want to do is create new neural pathways, which will facilitate new and healthier habits. What helped me the most was to shift my focus away from the result I wanted to the habits I wanted to establish.
I stopped weighing myself, I stopped thinking about losing weight, I focused on eating well, and not eating in reaction to emotional triggers. I made changes in my life that removed those triggers, one at a time. Or I worked so that the disappointment didn't automatically result in over eating.
This post is getting way too long. But the principle applies to health changes, financial improvements, or stronger relationships.
Become the detective in your life and look for patterns of behavior that you want to change.
Ask yourself, "What kind of person do I want to be?" "How does the person I want to be live?"
There are so many things you can do, but the first thing is stop beating yourself up for being a failure, but to totally transform that focus to what you can do to establish twenty things you can do that help get your new habits into your life.