Recovering from a bad shot.
Forget about it.
We often let a bad shot affect our play going forward. Letting go, forgetting, or starting fresh is important. Doing it fast, before it affects the next shot (or 3 shots) is essential. Every shot is a new opportunity. A great recovery is as good or better than a great first shot. It reinforces the idea that you can recover, but first you have to let that mistake go.
Use a reset ritual. Use it in practice so you are comfortable with it when you are playing a round. Your reset ritual will have 4 parts: a break from thinking about the mistake, breathing to get your head and your body under control, a release to leave the error behind and a refocus to get your thinking on track.