Mishkat al-Masabih 1626
‘Abdallah b. Ja'far reported God’s messenger assaying:
Recite to those of you who die, “There is no god but God, the Clement, the Beneficent; glory be to God the Lord of the mighty throne; praise be to God the Lord of the universe.” On being asked what is appropriate for the living, he replied that these words were better and better. 

Ibn Majah transmitted it.
وَعَن عَبْدِ اللَّهِ بْنِ جَعْفَرٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَقِّنُوا مَوْتَاكُمْ لَا إِلَهَ إِلَّا اللَّهُ الْحَلِيمُ الْكَرِيمُ سُبْحَانَ اللَّهِ رَبِّ الْعَرْشِ الْعَظِيمِ الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ» قَالُوا: يَا رَسُولَ اللَّهِ كَيْفَ لِلْأَحْيَاءِ؟ قَالَ: «أَجود وأجود» . رَوَاهُ ابْن مَاجَه