You have to train your mind as if you are already there. If you get tired while swimming laps in the shallow end, don’t give yourself the option of standing up in the middle of the lane. Your only resting point should be the gunnel at the other end of the pool. That way, when you get to the ten-foot end, you know from experience that you can make the distance.