The Messenger of Allah ﷺ said on the day of Uhud, in a long supplication, "Allah, make faith beloved to us and adorn it in our hearts, and make disbelief, wickedness, and disobedience hateful to us, and make us among the rightly guided. Allah, take our souls as Muslims, give us life as Muslims, and join us with the righteous, neither disgraced nor afflicted by trial." The hadith continues.
قال رسول الله ﷺ يوم أحد في دعاء طويل: اللهم حبب إلينا الإيمان، وزينه في قلوبنا، وكره إلينا الكفر، والفسوق، والعصيان، واجعلنا من الراشدين، اللهم توفنا مسلمين، وأحينا مسلمين، وألحقنا بالصالحين غير خزايا ولا مفتونين الحديث.
Ahmad (15492), Bukhari in Adab al-Mufrad (699), Bazzar in Kashf Astar (1800), Hakim (1/506–507), and Tabarani in Dua (1075) all narrated it through various chains from Abdul-Wahid bin Ayman, from Ubayd bin Rifa Zurqi, from his father, who related it. Its chain of transmission is sahih, and the discussion of it is elaborated upon in the biography of the Prophet ﷺ