Don't beat yourself up. FOcus on the positive, you did 5 days!
Promise yourself that you will get back on track and stay there. The best time to find a coping mechanism is when you don't need one. Ie plan now how you will deal with stress in the future. You have found out today that stress is one of your triggers for eating. If you find an alternative now , then next time you are stressed you will have an alternative strategy.
Have a look at NLP in google. It is a really good way of developing coping mechanisms and self belief. I gave up smoking with it 7 years ago and haven't touched one since. Its not for everyone. If you are wondering why i don't use it for staying slim- I don't really have a problem with food, I have an underactive thyroid that dictates how fat i will be!
Stay focused, remember why you are doing this in the first place and nothing , absolutely nothing tastes as nice being slim feels..