In both Leo Tolstoy's "The Death of Ivan Ilyich" and Jack London's "To Build a Fire," the protagonists fear death and resist giving in to death until the last moment. Then they both discover that death is something different from what they feared.
In "The Death of Ivan Ilyich," when Ilyich has gone through all the stages of his terminal disease and has reached the end, he has the following epiphany:
And suddenly it grew clear to him that what had been oppressing him and would not leave him was all dropping away at once from two sides, from ten sides, and from all sides. He was sorry for them, he must act so as not to hurt them: release them and free himself from these sufferings. "How good and how simple!". . . He sought his former accustomed fear of death and did not find it. "Where is it? What death?" There was no fear because there was no death. In place of death there was light. "So that's what it is!" he suddenly exclaimed aloud. "What joy!"
In "To Build a Fire," when the anonymous protagonist is freezing to death in the snow, he has a similar epiphany:
Well, he was bound to freeze anyway, and he might as well take it decently. With this new-found peace of mind came the first glimmerings of drowsiness. A good idea, he thought, to sleep off to death. It was like taking an anaesthetic. Freezing was not so bad as people thought. There were lots worse ways to die. . . Then the man drowsed off into what seemed to him the most comfortable and satisfying sleep he had ever known.
Neither of these men is religious. They do not die with any hope of an afterlife. Nonetheless, both come to realize that nature itself is totally indifferent but not in the least punitive or sadistic. Both stories end by giving readers reassurance about their own inevitable fates.