I heard the Messenger of Allah ﷺ say, "None of you should die except while holding a good opinion of Allah."
حدثنا روح حدثنا ابن جريج أخبرني أبو الزبير أنه سمع
سمعت رسول الله ﷺ يقول لا يموتن أحدكم إلا وهو يحسن الظن بالله
Its isnad is sahih, it was previously mentioned at 14418.