Have you ever noticed that voice inside your head? That internal dialogue you have with yourself when you're nervous or doubting yourself? Thoughts like: "Oh god, I'm not looking forward to this", "What if I go home now and forget this" or "Oh no, I'm really so bad at swimming, why am I doing this?"
Contrast that feeling with when you are happy and confident doing something you love. In that situation you calmly and confidently go about the activity and the voice in your head is quiet.
This negative internal dialogue is really just your fight-or-flight mechanism telling you not to do something and run instead. By listening to it you are giving it a voice, which amplifies your feelings, giving you an even greater surge of anxiety. It's like a feedback loop running round and round your head creating more self doubt and heightened anxiety.
The next time you hear the voice, take control and tell it "I know what you are, be quiet!". Do this any time you are feeling nervous: when you are thinking about tomorrow's squad session, getting in your wetsuit on the beach or half way down a lap of swimming. Realising what that voice really is - and that it is only a small part of you, not all of you - is very empowering indeed.
Switch off the voice, walk onto the pool deck tall and proud and your confidence will build and build. Soon you won't hear that voice any more.