What do you do when the strength, confidence, and success in the gym does not transfer in to the mountains?
The concept of training being "functional" covers all aspects, psychological included. If the physical and psychological training isn't transferable to the actual task it isn't functional.
The tendency of the "physical" individual will always be to over-emphasize the physical. I think most climbers and skiers - my former-self included - fit into this category. Unfortunately, given adequate attention and self-discipline, strength and endurance are easy to come by so when we start getting positive feedback from our physical experiences we can easily trick ourselves into imagining these unrelated achievements are transferable. Even when the truth is staring us in the face.
Positive feedback in the gym or similarly controlled environment can be so powerful that we try to use it as the means by which we accomplish other tasks. The obvious one here would be to keep hammering away on the strength "channel" when increased technical skill would give the biggest bang for the buck. Or to keep focusing on the gym standards when we need to go outside and do things that forces us to explore the interior. Over-emphasis on the physical is a comparative dead end when assessed against the progress we can make by training our minds - whatever that may mean to each of us individually.
I don't know that there is a universally applicable answer to the question, other than saying, "Self-interrogation is the key." Looking back, despite the fact I placed a lot of emphasis on physical training at certain points in my climbing career, I can't point to a single instance when a lack of physical strength, i.e. something I could obtain in the gym, kept me from doing a route in the mountains. For sure, being confident in my strength allowed me to attempt and do more, and a lack of belief in my strength at some points steered me away from certain objectives.
Could time and energy be better spent? How strong is strong enough? How much physical endurance is enough? What is causing me to fail or to turn back when I do so?
There's a discussion in ExAlp about how fear used to paralyze me and taking a break from climbing, separating myself from my unrealistic and over-ambitious climbing plans to study a martial art was the key to breaking the cycle of try-fear-fail-anger-depression that my trips to the mountains were producing. I could have gone a more Zen route but I'm physical and I learn through the use of my body so the martial art was a fine compromise.
Perhaps the best answer to, "What do you do when …?" is this: don't keep doing what you are doing.