In the name of Allah, the Entirely Merciful, the Especially Merciful. O Allah! I seek refuge in You from knowingly associating partners with You in any way, and I seek Your forgiveness for that which I do not know.
Ameen.
Pain is one of the tests that Allah gives to His servants. However, does pain expiate sin?
Allah says in Al-Quran Surah Al-An'am verse 17:
Meaning: "And if God befalls
you with evil, then no one can remove it except Himself. And if God wants good for you, then no one can refuse His grace. He gives His grace to whomever He wills among His servants. And He is Most Forgiving and Most Merciful."
Through the verse, only Allah can forgive a person's sins. Pain is not a guarantee to drop sins, but pain can be an
opportunity for someone to improve themselves and get closer to Allah.
From Ummul 'Ala said, "The Messenger of Allah, may God bless him and grant him peace, visited me when I was ill, and he said,
"Rejoice, O Ummul 'Ala, verily the pain of a Muslim is made by God to remove his faults with it, just as fire removes the rust of gold and silver." (HR Abu Dawud).
So, in addition to trials or misfortunes, pain is also a form of reminder as well as favor and grace from Allah. Therefore, a sick person should introspect himself with a lot
of repentance, prayer, dhikr, and strive for the pain to be lifted immediately.
Therefore, as Muslims, we should always be grateful for all the tests given by Allah and try to improve ourselves in facing them. Because Allah's love and proof of His love is in the tests He gives.
Wallahu'alam.