Sunan Ibn Majah, Book 37, Hadith 68 (Ibn Majah 4171)

It was narrated that Jabir said:

“I heard the Messenger of Allah (ﷺ) say: ‘No one of you should die except thinking positively of Allah.’”