In these moments, I would like to just take a break - relax... take time to just think of nothing but happy thoughts, and if possible take my mind off the subject of concern. Different people have different ways in doing so. For me, I'll go to the movies or have a walk at the beach.
After some time (maybe a few hours or a day or two), I'll then go through a post-mortem, and see if there were anything that could be done in another way to avoid such situations. And also to learn from the whole event.
Finally, it's time to restrategise again. I restrategise every once in a while, and not only in 'bad' times - especially in every quarter. The aim - to bounce back; not to be drowned and swept away from the ultimate goal and dream. In this process, I'll write the main goal and break them into parts that needs attention and focus.
The idea is not to take defeat and be bitter about it, but instead to turn it around, bounce from it, and ultimately be a hero from it. For the greater the challenges, when we rise, the greater a hero we are.