Do the Agonies of Death Expiate One’s Sins?
Question

Do the agonies of death reduce a person’s sins? Does sickness reduce a person’s sins? Please advise us.
Praise be to Allah.Yes, everything of sickness, difficulty, worry or distress that befalls a person, even the prick of a thorn, is an expiation for his sins. Then if he bears it patiently and seeks reward for that with Allah, as well as the expiation of his sins he will be rewarded for the patience with which he bears the calamity that has befallen him. It makes no difference whether that is at the time of death or before. Calamities are expiation of sin for the believer.
The proof of that is the verse (interpretation of the meaning):
{And whatever of misfortune befalls you, it is because of what your hands have earned. And He pardons much.} [Ash-Shura 42:30]
Since that is because of what our hands have earned, this indicates that it is an expiation for the things we have done.
The Prophet (peace and blessings of Allah be upon him) said that no worry, distress or hurt befalls the Muslim, not even a thorn that pricks him, but Allah will expiate his sins thereby.
For more details, please see the following answers: 71236, 169682, 201751, 114019.