I once completely freaked out at the top of a mountain.
Probably my third day snowboarding, I completely lost it on a green run which was almost completely flat. I was surrounded by knowledgeable snowboarders who were telling me everything was ok, but my fear of heights took over. Part of me was aware this was a total overreaction, the other part couldn’t care less, pushed my heart rate through the roof and made my sight go funny.
Reason prevailed, and I managed to get down the mountain eventually. Today I truly enjoy snowboarding, and even when confronted with a route that looks like it has a drop, I manage to keep it together.
My strategy was to take baby steps and progress, not as fast as my skill developed, but as slowly as my confidence grew. Gently pushing outside my comfort zone, while having a body of experiences I could refer to when I doubted myself.
Keep on swimming! :)