Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Death is the unavoidable end of all human, Muslims and non-Muslims.
2- No one indicated that death is painful, but the pain a dying person finds is the pain of the sickness that we cope with at the end of our lives.
Responding to your question, Sheikh Salman Ibn Fahd Al-`Udah, a well-known Saudi scholar, states,
Ibn Hazm al-Andalusi wrote a short epistle entitled “Refuting the Idea that Death is Painful”. He argues that there is no pain in death whatsoever. The only pain is that of the sickness that we cope with at the end of our lives. He also says that when we observe a dying person’s behaviour, it gives no indication that death itself is a painful process.
Likewise, Ibn Miskawayh, a great Muslim scholar, wrote “A Treatise on the Fear of Death” where he addressed this topic in a similar manner.
The Qur’an talks about “the intoxication of death (sakarat al-mawt). Intoxication refers to a befuddlement of the mind or the loss of consciousness; it does not indicate pain.
The “intoxication of death” from which the Prophet (peace and blessings be upon him) suffered is mentioned in the Sunnah; on the last day of his life, his daughter Fatimah (may Allah be pleased on him) witnessed his suffering. So she said,“How my father is suffering!” To these words, the Prophet (peace and blessings be upon him) remarked, “Your father will not suffer anymore when today is over.” (Al-Bukhari)
Some scholars mentioned that the intoxication of death may expiate for some of a person’s sins.
Mentioning the death of the wicked, Allah Almighty says in the Qur’an, “If you could see when the wrong-doers reach the throes of death and the angels stretch their hands out saying, ‘Deliver up your souls’.” (Al-An`am 6:93)
He also says, “If you could see how the angels receive those who disbelieve, smiting their faces and backs, saying, ‘Taste the punishment of burning!’” (Al-Anfal 8:50)
Al-Bara’ ibn `Azib (may Allah be pleased with him) has narrated from the Prophet (peace and blessings be upon him) that the believer’s soul emerges from the body as water flows from the mouth of a pitcher. (Abu Dawud)
This indicates that the transition is easy. As for the unbelievers and hypocrites, their souls are ripped from their bodies like a metal comb rips through wet wool.
It was also reported that the Prophet (peace and blessings be upon him) said, “The believer dies with sweat on his brow.” (At-Tirmidhi)
This can be understood in many ways. It can be taken to mean that a believer’s death is easy. The Prophet’s brow broke out in sweat right before his passing, and those who were with him wiped it off.
Allah Almighty knows best.
Excerpted, with slight editorial modification, from: en.islamtoday.net