Oh floo, what you say is very common. Often medication eases the passage, thank goodness.
The story that Ricky posted is frightening, people store things in their subconscious and that is what came to the fore in that scenario. There are drugs that make everything gentle and dreamybut some are dreams or memories that are frightening! All we can believe regardless of religion or faith is that the person stopped feeling so frghtened once dead. That's what is meant by "rest in peace". More unpleasant for those who witnessed the patient in the last days and the patient's relatives. The horrors will stay with them unlike the deceased for whom it will be all over.
All makes me feel sad, sounds selfish but I hope buried horrors don;t come to fore when i am near death. Done my best to 'get them out' in lifetime but you never know. Wouldn't want that for kids or husband - or any people.