There is lots online about the Navy Seal 40% rule. When you think you are done, you are only 40% done and there is lots more you can give.
I ran a 10k race on Sunday and was at a fine pace all the way through not to bother me. Not going for a quick time, just jogging around and chatting with friends. I have done half marathons before and my friends have done full marathons and ultra-marathons. The 10k distance should have been a nice jog all the way around, but we all found that just seeing that 9km marker made it instantly harder. Your mind starts to say, 'come on only another 1km to go, push on through.' My body started to tense, and I found myself willing myself to get to the finish line. Before seeing the sign that we only had 1km to go, everything was fine - I could have gone on for ages. If I had not seen the sign I know, as I have done hard marathons, that I can do about double the distance at the same pace. Knowing that I was near the end caused my mental process to get interrupted, my body to react and everything got more difficult.
Training where you do not know where the end will be is mentally tough. This is what they train for in the special forces and this is the right training to do.
Where in life do you know where the end is? Only in manufactured environments. School - exam. Race - finish line. Work - clocking off time.
Real life, the middle bit in-between your twenties until you die does not have clearly marked waypoints. You know neither whether you are headed in the right direction or how long you will be out here for. Not much trains you effectively for this apart from Stoicism. Having the mental capacity to keep going and doing the right thing is the thing that life demands but is not formally taught. Unless you seek it out and push yourself you might be able to keep going, but are you going in the right direction. Or you might be going in the right direction and give up before you get there.