The key is not to hesitate or think about the 'negative' side of training (not even for a split second) but to always focus on the 'grand payoff' - the 'prize' you get in the end for all your work. If you allow your mind to focus on the negatives (such as the pain, the cold etc) for even a second, you have allowed your mind to betray you. You must create a daily attitude within your mind that believes "This is great, and I'll do whatever it takes, and meet each challenge with fearlessness and courage". This 'conditions' your mind and body to relentlessly plough through difficulties and adversity until you ultimately reach your goal, instead of finding excuses to perform badly, which it loves to do! Focus 100% on the payoff from your training, not the negatives - that's number one.
Secondly, you must develop a characteristic which I call 'mental stamina'. If your body can swim 400m each day easily but your mind cannot, then you are in big trouble - and this is actually very common. You must develop mental endurance so that you do not get beaten-down by the constant 'relentlessness' of daily training. One way to do this is to constantly re-affirm to yourself how easily you are handling each day's training (even if this requires some major 'bending of your reality' to do this).
Remind yourself constantly (almost like an affirmation or mantra) that you are on cruise control and flowing through training easily and effortlessly, and eventually this will become your automatic (or 'default') mindset. Once this happens, very little will seem difficult to you, as your mind will be prepared to overcome virtually anything that gets in your way, and drive your body to the heights required to achieve what you desire. This, needless to say, creates mental stamina or endurance. Once you possess this, you may actually feel mentally (and physically) fresh even when the others are falling down around you.
Another great practice for your daily training is to 'extract the positive' out of every single training session. On the way home from training, ask yourself each day what you did 'especially well' during that session, and then replay that part of your training through your mind all over again. This gets you into the habit of focusing positively, instead of looking for reasons to mentally beat yourself up!
So basically, you're saying to yourself (in your mind) after each session "what was great about me today?"! This may sound conceited or being overconfident, but it's not - it's mental training! Plus, just as an added bonus, it also will improve your self-image - which will help you in EVERY area of your life, as well as your swimming. Your daily habits create your success. So make your daily training sessions positive, powerful and purposeful, and these will create mental stamina, more energy and better performances.
The Mind controls the body, and the mind is unlimited. The best of success,
Craig Townsend

