It's a matter of attitude. Having some sort of philosophical or spiritual foundation helps in these sorts of dire circumstances. And, as indicated, it's not just a matter of survival but of finding happiness.
An extraordinarily useful attitude to have. Thank you for this article; I've been seeing that name Ryan Holiday quite a bit recently.