Flatliners
(2017)

A group of medical students perform experiments in which they flatline to gain a sense of understanding of the afterlife, resulting in them experiencing euphoria and enhanced capabilities. However, they become haunted by their past mistakes.

Courtney (Ellen Page), the one who initiated the experiment, is killed after seeing a vision of her younger sister who died in a car accident that was Courtney's fault. Her friends then have to face what they have done or suffer a similar fate.

After reconciling with their mistakes, the gang forgives themselves and quit the flatlining experiences while honoring Courtney's memory.

Thanks Jeremy!