Victor Frankl survived Auschwitz, a story he tells in his book Man's Search for Meaning. While he is quite clear that surviving the camps was an act of chance, a random matter of extraordinary good luck, he does not discount choosing optimism and a search for meaning as survival factors.
Frankl was a psychologist, and his theory of logotherapy argues that instead of the Freudian pleasure principle or the will to power, the search for meaning is the most powerful force motivating people. We all want to lead meaningful lives, and as long as we feel we are doing so, we have a strong desire to stay alive. We find meaning in three ways: through our work, through relationships with other people, and through choosing how we will respond to whatever situation we are thrown into. According to logotherapy, without a sense of meaning, we can easily lose our will to live.