For those who are struggling and finding it hard to resist things like chocolate, my strategy in really difficult times is to allow myself some of it without feeling like I’m ‘cheating’ or framing it as a failure. This avoids that defensive compulsion to just eat the whole thing down quickly and/or move on to even more indiscretions.
I am quite good at distracting myself and fighting the urge to eat when I’m feeling rough, but there is the odd day or night where I just know that nothing else is going to fill that emotional ‘hole’ and on those occasions I will mindfully have something to calm that feeling.
I find it quite important not to say to myself, ‘I’ll only have two/three/whatever’ (because that usually means I’ll get rebellious), but instead I’ll say, ‘I’ll have enough to feel okay again’. The key, though, is to pick carefully - find something that a) is worth it, b) that you actually like (in other words not a poor substitute), c) that’s as low-ish carb as possible (so a small serving of ice cream is much better than a doughnut, for example. Chocolate is better than cake/cookies/bread), and d) enjoy it properly, slowly, savouring it and getting the full benefit from it and then e) stop when you feel okay again - which is where not framing it as a cheat or a failure comes in, as you avoid the in for a penny, in for a pound mindset.
As an example of what I mean, on ‘normal’ days where I fancy a little bit of chocolate, I’ll just have the dark chocolate that is best for BC. However when I’m in that space, I will have a more milky chocolate. Or I will have dark chocolate with some peanut butter on top, which makes it far more satisfying and hits that spot much better. I will have however much I need to feel better. But I won’t be stuffing it into my mouth as quickly as possible. I will eat it mindfully, and positively.