when death approaches, The Prophet
صلى الله عليه وعلى آله وسلم and the divinely appointed proofs (Imams, peace be upon them all) are made present to the dying person so that they may see them. If the person is a believer, they will see them in a pleasing state; if they are not a believer, they will see them in a way they dislike. Allah
سبحانه وتعالى, the Blessed and Exalted, has said: "Then why, when the soul reaches the throat, and you are at that moment looking on, and We are nearer to him than you, but you do not see" (Sural Al Waqi’ah
56:83-85)
Commentary #2