On my daily commute, I travel from home to Cambridge city on the cyclepath most days. From my home to Cambridge station is just over 5km and it's a fast ride (12 minutes or less depending how many pedestrians and other cyclists get in the way)
When I am doing a long ride, and I'm starting to get tired, (and lets say I still have 40km to ride), I say to myself:
40km .... not too far, it's only 4 times to the station and back
sounds corny, but it works for me