On giving up as 2020 draws to an end

“But a man does not yield when the mere universe has turned against him; he yields when his own heart has turned against him. We surrender, not when circumstances are miserable, but when we are miserable. As long as a man is not a pessimist it does not matter how much he is a failure. … All failure is a failure of internal happiness.”
- G. K. Chesterton

I found this quote on the internet today, but have not yet figured out from where the quote stems. It does however remind me to pick up the book by Chesterton I've had on my bookshelf for about two years now.

This quote is relevant to me as 2020 became the year that I gave up. During Christmas I've started thinking that maybe that might be because of the collective pandemic depression we seem to be experiencing. So now I question whether I was right in giving up or not.

Certainly there is a time for giving up. When you repeatedly get the same results from the same actions, yet anticipate a different outcome; it is time to stop and have a good look at what you're doing, and why. Perhaps the only way forward is through giving up? I believe that in those circumstances one needs to give up on something. The question is what. What exactly is it you need to give up on, so as to free up the resources to take up something else? And what is that something else you need to start doing or being?