No matter how well you plan your project, there will be times when things go wrong. How you react to these unexpected problems is possibly the most important determining factor in your success.
If at first you don't succeed, it is not enough to simply try and try again; there has to be some adaptation to your approach before you can expect different results.
Sometimes the mistake is obvious, and you can adapt quickly and throw yourself back into the work. Other times there may be no obvious mistake or solution, in which case blind determination may be counter-productive.
Take time to think
Take some time to think. This may be difficult to do when you are under pressure to produce, but it is essential to slow down and think before taking action.
It may be tempting to check email, it may be tempting to work on something else, but these are just ways of avoiding the situation. Give yourself the opportunity to find a solution by spending a little more time with the problem.
The second option
When you take time to think, maybe a possible solution will occur to you quite quickly and you go back to work immediately...
But this solution may be only one of many possibilities. By rushing to implement the first solution that comes to mind, you are excluding other, possibly better, courses of action.
What if there is a second option, or a third? It is worth taking a little longer, even just 20 minutes, to go beyond the obvious, in order to find these alternatives before deciding on a course of action.