"Oh, terribly! He screamed unceasingly, not for minutes but for hours. For the last three days he screamed incessantly. It was unendurable. I cannot understand how I bore it; you could hear him three rooms off. Oh, what I have suffered!" (1.38-40)
We're told right off the bat to expect Ivan's death to be a very painful one. We're also given an insight into just how selfish Praskovya Fedorovna is. Look how quickly she moves from Ivan's suffering to her suffering. She's obviously appealing to Peter's pity. Not only that, it's not even clear that Praskovya suffered because it hurt her to see her husband suffer. It almost sounds more like she just found the loud noise he made to be disturbing.
"Three days of frightful suffering and the death! Why, that might suddenly, at any time, happen to me," he thought, and for a moment felt terrified. But – he did not himself know how – the customary reflection at once occurred to him that this had happened to Ivan Ilych and not to him, and that it should not and could not happen to him, and that to think that it could would be yielding to depression which he ought not to do, as Schwartz's expression plainly showed. After which reflection Peter Ivanovich felt reassured, and began to ask with interest about the details of Ivan Ilych's death, as though death was an accident natural to Ivan Ilych but certainly not to himself. (1.44)
Peter Ivanovich is initially scared to learn of Ivan's suffering because it occurs to him that he could undergo something just as horrible. But it's not long before he has the same reaction to suffering he has to Ivan's death: he just denies that it could happen to him. And once he makes that move, every detail he learns about Ivan's suffering only makes him less sympathetic. The worse it sounds, the less believable it becomes.
But this discomfort increased and, though not exactly painful, grew into a sense of pressure in his side accompanied by ill humour. And his irritability became worse and worse and began to mar the agreeable, easy, and correct life that had established itself in the Golovin family. Quarrels between husband and wife became more and more frequent, and soon the ease and amenity disappeared and even the decorum was barely maintained. (4.1-2)
All it takes is a little discomfort for Ivan's life to start falling apart. Because Ivan just lives for the sake of enjoying himself and keeping everything pleasant, the moment things become unpleasant he can no longer handle the situation. His characteristic good mood goes pretty quickly, and his family relations go bad almost immediately.
With this consciousness, and with physical pain besides the terror, he must go to bed, often to lie awake the greater part of the night. Next morning he had to get up again, dress, go to the law courts, speak, and write; or if he did not go out, spend at home those twenty-four hours a day each of which was a torture. And he had to live thus all alone on the brink of an abyss, with no one who understood or pitied him. (4.27)
By this point life itself has become suffering for Ivan. Whether it's work or staying at home, or anything else, life has become unbearable. The sense of isolation Ivan feels is a large part of his agony. Even worse, it's not clear what Ivan can do to change anything. It's possible that his whole future looks like this (in fact, that's the way it turns out).
For his excretions also special arrangements had to be made, and this was a torment to him every time – a torment from the uncleanliness, the unseemliness, and the smell, and from knowing that another person had to take part in it. (7.2-4)
As Ivan's body goes, he certainly suffers a lot of physical pain. But that's not all: he also suffers a loss of dignity. He can no longer do the things he used to, and he now depends on other people to take care of him. And taking care of him means dealing with the more disgusting aspects of Ivan's illness. This is humiliating.
Once when he got up from the commode too weak to draw up his trousers, he dropped into a soft armchair and looked with horror at his bare, enfeebled thighs with the muscles so sharply marked on them. (7.6)
Ivan's physical decay is also torturous to him because he can barely recognize his own body. He has to watch himself fall apart. He's been used to a healthy body all his life, and now he's losing it quickly and becoming something he himself finds disgusting.
Apart from this lying, or because of it, what most tormented Ivan Ilych was that no one pitied him as he wished to be pitied. At certain moments after prolonged suffering he wished most of all (though he would have been ashamed to confess it) for someone to pity him as a sick child is pitied. He longed to be petted and comforted. He knew he was an important functionary, that he had a beard turning grey, and that therefore what he longed for was impossible, but still he longed for it. (7.34)
What Ivan wants most of all is for someone to recognize how badly he's suffering and just show him some care. But nobody wants to recognize it, and nobody gives him the care he needs, except Gerasim. It seems that his suffering itself is made much worse by not being acknowledged by anyone else. Ivan's suffering gradually reveals to him that he needs other people, and can't just depend on himself. That's the first step in coming to care for other people. It's no coincidence that Ivan is said to feel like a child. Ivan's childhood – the period when he openly depended on others – was also the only happy time in his life.
It was morning. He knew it was morning because Gerasim had gone, and Peter the footman had come and put out the candles, drawn back one of the curtains, and begun quietly to tidy up. Whether it was morning or evening, Friday or Sunday, made no difference, it was all just the same: the gnawing, unmitigated, agonizing pain, never ceasing for an instant, the consciousness of life inexorably waning but not yet extinguished, the approach of that ever dreaded and hateful Death which was the only reality, and always the same falsity. What were days, weeks, hours, in such a case? (8.1)
By this point, Ivan's life has become unbearable . It's all the same: endless pain, constant fear. Nothing in particular matters any more. That's why Ivan is able to completely lose track of time.
Peter went out. Left alone Ivan Ilych groaned not so much with pain, terrible though that was, as from mental anguish. Always and for ever the same, always these endless days and nights. If only it would come quicker! If only what would come quicker? Death, darkness?...No, no! anything rather than death! (8.15)
Ivan's suffering is so bad at this point that he actually wants to die, just to put an end to it. There's no other end in sight. But he's terrified of death too, because he can't wrap his mind around what it means. So Ivan is stuck between the two, itself a form of torture.
It was true, as the doctor said, that Ivan Ilych's physical sufferings were terrible, but worse than the physical sufferings were his mental sufferings which were his chief torture.
His mental sufferings were due to the fact that that night, as he looked at Gerasim's sleepy, good-natured face with its prominent cheek-bones, the question suddenly occurred to him: "What if my whole life has been wrong?" (11.10-11)
The final ordeal Ivan goes through is the recurrence of that awful thought that his whole life has been lived wrongly. That's even worse than the physical pain he's suffering. It threatens to suggest that all of his suffering has no purpose, because Ivan's whole life has none. He's been a failure, and he's just about to lose any chance to redeem himself. As it turns out though, Ivan's suffering might be just what leads him to find a purpose in his life.