The more you think, the slower you'll go. That is, what you think, say to yourself, and image both before and during your race determines whether you'll go fast or slow. A positive attitude will help you overcome hardships and setbacks and keep you going. A negative attitude will trick you into giving up too soon. Winners in and out of the pool are positive.
Most swimmers complain bitterly about pool temperature, lane assignments, rain, and fatigue.
The great swimmers use any kind of adversity to help them get the competitive advantage over their opponents. For example, you can do 1 of 2 things with the pain and fatigue of a race. Learn to think like a winner by reframing. Acting as if is the master strategy of champions. If you act the way you want to become, you'll become the way you act.