The Holy Quran says...
(3:30) Seeing his bad position in the everlasting world of the hereafter: A sinner or one who is basically not having faith in Allah, the hereafter and sayings of prophets; in such a way that his expression of faith was only formal and not rooted in his being and that is why he justified his offensive acts and always contented himself with vain and useless hopes and some of his minor acts and was uncaring about the imminent consequences of the hereafter.
But as mentioned in traditions, at the time of death, the curtain will be removed from the conscience of man during the throes of death and in one instant he would see with his own eyes, his position in the hereafter as well as the consequences of all his deeds, views and behavior and also observe all his hopes being dashed and he would pass away in that condition. And how difficult dying is in this condition! Cutting off perpetual relations:…