The sentence from this excerpt from Leo Tolstoy's The Death of Ivan Llyich that shows the human tendency to contemplate one's past life is:
"He lay on his back and began to pass his life in review in quite a new way."
It is normal, when something that you didn't expect crashes into your life, to start thinking about your whole life, to start analyzing it. In this case, when Ivan suspects that he is soon leaving the life as he knows it, he starts reviewing it. He feels he is "leaving" his life with the consciousness that he has lost all that was given to him and that now it is impossible for him to rectify it. He looks backwards and contemplates the facts that had been happening in his life once he feels closer to his end.