Jabir bin Abdullah reported,

I heard the Prophet ﷺ, three days before his death, say, "None of you should die except while holding a good opinion of Allah."

Muslim 7229

Sahih

حدثنا يحيى بن يحيى أخبرنا يحيى بن زكرياء عن الأعمش عن أبي سفيان

عن جابر قال

سمعت النبي ﷺ قبل وفاته بثلاث يقول لا يموتن أحدكم إلا وهو يحسن بالله الظن

مسلم 7229صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Paradise and the description of its bliss and its people
Chapter
Command to think well of Allah at the time of death
Numbering
Darussalam 7229
Muslim 7229