As Ivan Ilyich moves closer and closer towards his death, he begins to realise more about his life and the way that he has lived it. His concluding realisation, that his life was not "the real thing," is based on the way that he is treated by his wife and family as death comes ever nearer, which exposes the vanity, and the falseness of the upper-class. Note what the narrator tells us about the appearance of his wife after his last communion and how this reveals the emptiness and the falsity of Ivan Ilyich's life:
Her dress, her figure, the expression of her face, the tone of her voice, all revealed the same thing. "This is wrong it is not as it should be. All you have lived for and still live for is falsehood and deception, hiding life and death from you."
The emptiness of Ivan Ilyich's life is of course contrasted with the simple acceptance of death by Gerasim, his peasant servant, who manages to comfort Ivan Ilyich precisely because he is open in his recognition that death is a part of life, contrasted with his family, who never mention it and do everything they can to ignore the presence of death amongst them.