A great player, who was a strong gambler and A player once told me, "Matt, I don't care if I miss a shot. I just make sure that I'm never careless. I put 100% effort into each shot. I have a complete plan before I even get down on the cue ball. I know how the shot will be made, and where the cue ball will travel. Nothing is up in the air. Then I execute my pre-shot routine, stance, quality stroke, and execution of shot. If I miss, then I will know why I missed, and my brain will automatically adjust for the next time. Strong mindset if you ask me.
Edited to add.....you need to play and compete as often as possible. Stay in battle and under pressure. Everyone's great in the gym. Get comfortable under heat. Learn to enjoy it.
That same player I described above gave me great advice many decades ago. There was a player I was supposed to beat, but he had me out of my comfort zone. And he was heisting me every time. I was just dogging it from fear and nerves. This room was brutal too because a lot of people were always watching, it was loud, and tough to fade. Well, my mentor pulled me aside and said, "Matt, you have to play him on site, every time you see him. Don't give up." He said more, but that is the reader's digest version. Well, I followed his advice, and it wasn't long until I beat this guy easily. Later, I played in that zone so often I would only get nervous if it were too quiet.