It's rare when you play well without self-confidence. Self-confidence is your belief about how well you can play or how good your skills are. Confidence develops from physical practice, playing well in the past, trusting your mechanics, and knowing you are physically talented. The key is to understand how you gain confidence and then work on the areas in your game you can control that lead to greater confidence. The ability to totally focus on the task is critical to peak performance in any sport.
Total focus means thinking about the requirements of the shot and only the shot.
It also means playing one shot at a time and not getting ahead of yourself. Know the performance cues you should focus on and be aware when you are not focused on them. As you prepare for a shot, your attention starts broad as you assess all the factors that influence club and shot selection and then narrows as you engage with a specific target. To play in the zone you must be able to narrow your focus when needed. You play your best golf when you can narrow your focus on one thought, a target or swing cue.