A couple of things you can do. One is to think what happens if you continue that behaviour. Say you eat something bad today, so tomorrow you get that stress again, so do it again, then, that continues, how will you feel/look in 1 week, 1 month, 1 year, that's exactly how obese people become obese, they don't visualise, then take action to correct things before the problems become, a vile habit.
The second & more positive suggestion is to plan your cheat meals. Once or maybe twice a week, you can have a meal of whatever crap you want. So, say you really want that ice cream or chocolate on Monday, instead of going "No, I can never eat one of those tempting lovelies again
", you can go "Alright, you are safe for now, but on Thursday evening you are mine
". As you've planned the meal, there's no guilt, no worries either & it can reenforce a weakening will. You can also plan cheat meals for special nights out, visiting people, BBQ's etc, so you don't have to be the one eating the celery stick while everyone else has the veggie sausages
You don't have to go on one of those crazy Bodybuilders diets just to get & stay lean ( a quick Tee Hee to Robert & Alex-the daywalker
). Just aim at clean eating most of the time, but allow yourself the odd treat in a controlled way, that way you'll have the best of both worlds, a lean body & guilt-free treat munching