Some people pass away in such a blessed manner, as if they had requested the angel of death to take their soul in that way. These things happen even up to this day but generally to those whose hearts are very clean. We just need to make slight adjustments to our eyes, ears, tongue and heart.
When a person’s soul and body is totally compliant to the commands of Allah Ta‘ala, then Allah Ta’ala becomes happy with him and at the time of death he is given the glad tidings:
يَا أَيَّتُهَا النَّفْسُ الْمُطْمَئِنَّةُ ﴿٢٧﴾ ارْجِعِي إِلَىٰ رَبِّكِ رَاضِيَةً مَّرْضِيَّةً ﴿٢٨﴾ فَادْخُلِي فِي عِبَادِي ﴿٢٩﴾ وَادْخُلِي جَنَّتِي ﴿٣٠﴾
“O compliant soul! Return to your Rabb in a condition that you are pleased with Him and He is pleased with you. Enter among my pious servants and enter my Jannat.”