[Commentary]
The compiler—may Allah have mercy on him—includes in Riyāḍ al-Ṣāliḥīn a chapter that condemns wishing for death because of some harm that has befallen a person, except when fear arises for one’s religion. Anas ibn Mālik (may Allah be pleased with him) narrated that the Prophet (peace and blessings be upon him) said: “None of you should wish for death because of a calamity that has struck him.” Someone might be afflicted with a severe illness, extreme poverty, overwhelming debt, or the like, and then say, “O Allah, let me die so I may rest from this world.” Such a plea is forbidden and impermissible, for if he were to die he would not necessarily find relief; he might pass from the distress of this life to an even harsher punishment in the Hereafter.
For that reason the Prophet (peace and blessings be upon him) prohibited wishing for death on account of any hardship. Confront these trials with patience, the hope of reward, and the expectation of relief, knowing that no condition is everlasting. Allah alternates night and day and overturns affairs in ways a person never expects or imagines; when He wills a thing, He only says to it, “Be,” and it is. Therefore, do not wish for death because of the harm that has come upon you.
Regarding trials in religion: if people are tested in their faith—whether by the allure of worldly adornments, other temptations, corrupt ideologies, or deviant creeds—a person still should not wish for death. Instead he should say, “O Allah, take me to Yourself without exposing me to temptation.” Thus he asks Allah to keep him steadfast and to receive him in a state free from trial.