It is narrated from Sayyiduna Umar (may Allah be pleased with him) that he used to say in his supplication: O Allah! Cause me to die among the righteous, and do not leave me behind with the wicked, and join me with the good people.
Hadith Referenceالادب المفرد / كتاب / 629
Hadith Gradingالألبانی:صحيح
Hadith Takhrij«صحيح : أخرجه البخاري فى تاريخه الكبير : 349/6 و ابن سعد فى الطبقات : 331/3»
Explanation & Benefits
Shaykh Maulana Usman Muneeb
Benefits and Issues: A person will be resurrected on the Day of Judgment in the same state in which he died; therefore, Sayyiduna Umar radi Allahu anhu used to supplicate for death among the righteous so that he would be gathered with them on the Day of Resurrection. He would also say: “O Lord, protect me from evil companions, lest the good people pass away and I am left among the evil ones. And grant me the ability to perform such righteous deeds and accept them, through which I may be joined with the righteous.”
Source: Fadlullah al-Ahad: Urdu Commentary on al-Adab al-Mufrad, Page: 629