When things don't go your way or break down, don't dig in your heels and give up. Try to extend the play.
Instead of focusing on what you can't do, find something you can do. What's possible now, in the current situation, that will advance the project in a positive way.
Rather than keying in on what you don't want to pursue, look for something you'd like to undertake. There's almost always more than one thing that needs to be done, so look for another task that keeps the project moving.
Instead of drilling down on what went wrong, mitigate the negative impact and getting back to productivity. Post-mortems are sometimes indicated, but most times it's more effective to focus on fixing the problem first.
And if any of these options is just too hard. If you just need to feel puny or pissy or whatever, please, keep it to yourself. Sometimes we all need to feel sorry for ourselves for a little bit. But don't spread that to the rest of the team. Let them focus on keeping the ball moving while you sit with the towel over your head and try to regroup.