Remembering the bad stuff is always easier for some reason in life. Like in business. You can treat a customer perfectly for yeas. If you screw up one day though, all those good years go out the window and all the customer focuses on is the screw up.
With regards to changing your habits and not letting small setbacks turn into months of being off course..... I really think it comes down to conditioning your mind as well as managing your expectations.
Just how a little activity is good every single day, so is a little time spent on your mind. Spend some time visualizing, sorting out the bad thoughts and replacing them with good, really focusing. Just as your body gradually gets stronger and better, so will your mind. Soon, it will be next to impossible to knock you out. Sure, you might get knocked down..... but that's a hell of a lot different than being knocked out. And getting up will get a lot easier too.
In terms of managing expectations, it's critical. It's obvious for everyone that we aren't going to reverse what we've done, physically, overnight. It takes months and years to get into shape. And even then, usually most people aren't satisfied and want to do more and more. If you don't lose weight or the inches don't go the way you had hoped for 2 weeks, getting down on yourself is futile. Thinking of it as a failed attempt isn't going to improve the situation at all. Instead, view it as being a success in terms of figuring out what NOT to do. If things stagnate, don't get down. Instead, take action and modify your approach. Always focus on forward progress.
I say often how perception is everything.
If you perceive a stagnant 2 weeks to be a failure, you'll drown in your sorrows and regrets eventually.
If you perceive a stagnant 2 weeks as something to build upon, you'll constantly be in forward motion. Once mental momentum is established, it's a very hard thing to break.
And above all, remember you are not alone. You've got a huge community here who are experiencing this with you. And there are plenty of knowledgeable people around who can help you too.