Welcome to the world of getting comfortable being uncomfortable.
It is often said that the longer the race, the more mental (and less physical) it becomes. From personal experience I believe this to be true. Psychological training has long been researched as an area for improvement for endurance performance.