Successful weight loss really boils down to being as self-aware as possible. Meaning: thinking about yourself and your habits. Planning ahead. Thinking before you eat something. Making yourself exercise or say "no" to food. Etc.
There are lots of ways to learn to do all these things, and every person must find what works for them. For me, one of the most effective habits I've developed is the ability to ask myself "how will I feel after eating this?" My instinct has always been to focus on how I will feel while eating this. -Ahh, that smells so good, it will make me feel warm and happy, I need to eat it now!- When I started becoming more self-aware, I realized that no matter how I felt while eating a food, that feeling always went away soon after. The taste of the food was gone, the good, warm feeling became a memory. I am not one to feel guilty for eating something I shouldn't have. But, even if there's no guilt, there is still a feeling of let down. And, when I was overweight, there was usually a feeling of frustration. -I ate it, I want more, I'm not happy enough yet-
I had to learn to ask myself "will this be worth it?" Sometimes the answer is "yes". Well, then, I go ahead and eat it. But, no matter how good the food tastes while I'm eating it, the euphoria goes away quickly. A better feeling, or at least a more wholesome one, is the feeling of not eating something that I didn't need. I find that I didn't really miss the food all that much, and I'm proud of myself and feel in control.
The way to learn this habit is practice, practice, practice. Don't expect perfection. People who expect perfection of themselves are setting up for failure. If you thoughtlessly inhaled something you shouldn't have (yeah, I still do that all the time), shrug it off and try again the next time. You get a do-over every single time you encounter food.