Jabir bin Abdullah reported,

I heard the Messenger of Allah ﷺ say, three days before his death, "None of you should die except while holding a good opinion of Allah عز وجل."

Muslim 7231

Sahih

و حدثني أبو داود سليمان بن معبد حدثنا أبو النعمان عارم حدثنا مهدي بن ميمون حدثنا واصل عن أبي الزبير

عن جابر بن عبد الله الأنصاري قال

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

مسلم 7231صحيح
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 7231
Muslim 7231