There's really no such thing as the agony of dying. I'm quite sure that pain is shut off at the moment of death. You see something happens when the body knows it's about to go. Peptide hormones are released by cells in the hypothalamus and pituitary gland. Endorphins. They attach themselves to the cells responsible for feeling pain.
A lot of people fear death because they think that so overwhelming an experience has to be painful but I've seen quite a few deaths and with one exception I've never known anyone to undergo anything like agony. That's amazing when you think about it. I mean how complicated the mechanism is that's being taken apart.