There will, however, be many swimmers out there who still experience pain at the end of races, and so this tip is designed for you, to help you overcome pain by using a new mental attitude. To perform at your best, it's essential to 'make a friend' out of the pain. You see, the more you hate the pain, the more painful it will become, and the more it will slow you down! So here are a few different approaches you can try, just experiment with them and see which ones work best for you, because no two swimmers are the same.
If pain 'hits' you at the end of a race, one approach is to think to yourself "this is going to make me swim even faster, because the sooner I finish the race, the sooner I'll be over the pain". In this way, you are actually using the pain as motivation to swim faster, by turning it into an advantage instead of a major liability - and this works much better than 'hating' the pain.
Another approach (which has had some great results) is to see the pain as a 'process' instead of a 'place' - this means that instead of thinking that you are IN pain, think to yourself that you are MOVING THROUGH the pain. Move through the pain, instead of being in it - this makes a big difference mentally!
Sometimes your mind may even 'switch the pain off' altogether, if it's convinced that you have completely moved through it (it does this by releasing morphine into the system). This means that it's actually possible to move 'through and BEYOND' the pain, which is much better than being IN it!
Another comforting thought some swimmers use is to remember that all your race competitors are going through the pain as well - but you know that you will handle it better! Going through pain in one thing, but no-one wants to go through it alone! So remember that every other swimmer is probably experiencing it, and it will just be a matter of who handles it best (and makes sure it's you).
Last of all, pain is an emotional thing. Don't let it take you over emotionally - because once it does, it's got you. Remind yourself that it will only be a temporary feeling, not permanent, and that it can only dominate you if you allow it to. Don't allow it. Stay strong mentally, and you can dominate the pain, instead of the other way around.