67 – Chapter: The undesirability of wishing for death because of an affliction, while there is no harm in doing so out of fear of religious temptation
1/585 – Abu Hurayrah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings be upon him) said, “None of you should wish for death. If he is righteous, he may increase in righteousness, and if he is sinful, he may repent.” Agreed upon, and this is al-Bukhari’s wording.
In another narration recorded by Muslim from Abu Hurayrah (may Allah be pleased with him), the Messenger of Allah (peace and blessings be upon him) said, “None of you should wish for death, nor supplicate for it before it comes to him, for when he dies his deeds come to an end, and a believer’s lifespan is increased only in goodness.”
[Explanation]
The author—may Allah have mercy on him—said: “Chapter: the dislike of wishing for death because of an affliction that has befallen one,” meaning an illness or the like. As for wishing for death out of fear of a temptation that might endanger one’s religion, there is no objection, as the author (may Allah have mercy on him) stated; that is, if a person fears a trial that could compromise his faith, there is no harm in his wishing for death. The forthcoming hadiths will address this, Allah willing.
Regarding the first case, the author’s statement is correct: when a person is afflicted by hardship he should not wish for death, for such a wish is a mistake, evidence of foolishness in judgment, and a deviation in religion.