Resilience vastly depends on the ability to forget.
To say it from another perspective:
Perseverance vastly depends on existential myopia.
What allows us to put one foot in front of another (during long hikes, during freezing weather, during challenging times) is to focus on the small patch of ground immediately underfoot, to surrender the memories of countless other tiny patches already covered, and to ignore the thought of countless other tiny patches still to be traversed.
At some point, the struggle will stop. The summit will have been reached, the cold will have passed, the agony will have ended.
Until the next challenge starts.