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.
For the first half of geological time our ancestors were bacteria. Most creatures still are bacteria and each one of our trillions of cells is a colony of bacteria.