Things will go wrong in your PhD all the time.
It’s not you, it’s just the way things are.
When they do, you’ve got a choice over how you react. Either you can think calmly and rationally about the best way forward or you can panic and become overwhelmed by negative thoughts and emotions.
Our inbuilt negativity bias means we often tend towards the latter. But making a conscious effort to react more calmly can have a big impact on the way you relate to your PhD.
This isn’t to say you should ignore any problems that crop up, but rather you should ignore the inner critic that is trying to blow the problem out of proportion and which is trying to convince you the problem represents the end of the world or that it is evidence of your idiocy.
If you give that critic too much ammunition, you can find yourself panicking about the problem and find it hard to focus on anything else. A panicked response is a poor one, so you’re unlikely to solve the problem when you’re in this state of mind.
In reality though, the problem isn’t the end of the world, it is more often than not fixable and problems of any sort are a sign of progress and evolution.
So next time you encounter a problem in your PhD, take a deep breath, think calmly about what you can do to mitigate it and set clear boundaries and time limits for your attempts to do so. Then go and do something else.