The life of Ivan Ilyich is one that is dominated by vanity and pride. Note how he is so desirous of having the perfect house that he takes such interest in, even though the narrator tells us it is the same as every other house:
His house was so like the others that it would never have been noticed, but to him it all seemed to be quite exceptional.
Ironically, it is his pride that causes his illness, as he slips on the ladder whilst rehanging the curtains and wounds himself.
However, what brings Ivan Ilyich to a stage where he is able to recognise his own superficial life is the compassion and love demonstrated to him, firstly through Gerasim, but perhaps more importantly through his own son. Note how the act of compassion and love of his son in kissing his father's hand and crying acts as a catalyst for Ivan Ilyich. He realises that he pities and feels sympathy for his son and his wife and tries to ask for forgiveness, representing a move away from the pride that has dominated his life and an acceptance of love:
"Yes, I am making them wretched," he thought. "They are sorry, but it will be better for them when I die." He wished to say this but had not the strength to utter it. "Besides, why speak? I must act," he thought. With a look at his wife he indicated his son and said: "Take him away... sorry for him... sorry for you too..." He tried to add, "forgive me," but said "forgo" and waved his hand, knowing that He whose understanding mattered would understand.
It is at this stage, when he has forsaken pride and embraced love, that he is able to shed his fear of death and accept it. By so doing, he sees the reality of the "light" that is actually in "death" and realises that death need have no more power over him now that he has embraced it. Compassion and love expressed allow Ivan Ilyich to embrace these qualities himself and thus accept death rather than raging against it.