Perhaps, in the state between our last waking moments and death, it could be possible that we might have a spiritual realization about the way we've treated others and ultimately lived our lives. Perhaps, we are given one last chance to view the events of our life from a "higher" point-of-view, thus giving us a chance to reflect upon our memories and look back upon the actions we've taken throughout the course of our lifetimes.
I think you'd like the film Mullholland Drive (2001), it dealt with this theme in such a profound way, that to be honest, it completely transformed my whole way of thinking around death, life, hopes, fears and the essence of dreams. Would definitely recommend, by far one of the best films I've ever seen.