I've had a few bad days myself recently, I've just been a bit down. Don't beat yourself up about it, you're making the best decisions you can with what you have at the time, it's all any of us can do. Down the guilt road lies failure! You can have chocolate, or whatever you like, just not all the time. Think bigger picture, weight loss is (hopefully) for life, and you will get there! Even if it's slow, and even if you yo-yo a bit. Imagine yourself at your target weight, thinking about being glad you persevered through bad days. Then imagine yourself several lbs heavier than you are now, wishing you'd persevered through the bad days.
It's all good, you can do it