Simstim from Neuromancer (released in 1984) is the first mention of such a thing that I know of.
The actor was Natalie Wood, and the event is shrouded in mystery about how she died. However, the character who dies in the movie is played by Louise Fletcher.
The porn and the vicarious near-death-experience were just plot points.
The author of the screenplay, Bruce Joel Rubin, is a self-described spiritual teacher, and "transitional journeys" is kind of his thing. His three most well-known films (Brainstorm, Ghost, and Jacob's Ladder) are all about characters experiencing the afterlife in some way.