How to Improve Mental Endurance


Physical well-being directly affects mental performance. Regular exercise and a balanced diet can improve overall mental stamina.
The more you play, the better you'll become at maintaining focus. Consistent practice can help you build mental stamina over time.
Building mental endurance is a gradual process. Be patient with yourself and focus on steady improvement.
In the past few days I have had several games, both OTB and online, where I had a winning advantage but ended up blundering around 20-30 mins in. I think the main reason for this is that I lose my focus. How does one go about improving mental endurance?
I normally play on long time controls. I also try to conserve my energy for the late middlegame and endgame. However, I am still easily losing. Am I missing something very important that I should be doing?