I watched this movie on Amazon Video or Netflix about two years ago. I think it was in spanish. The movie was based on the teachings or visions of some spiritual person. In the movie, the doctor is shown as a selfish man living a normal life. He only accidentally helps another person when his secretary makes him see a patient for free. The doctor dies and awakens in a horrific hellish world filled with black mud, there are many scenes of torture, he is stuck in this world for quite a while as he has time to grow a beard and long hair. As he is nearing the end of his patience he feels remorse and falls to his knees begging for mercy. After a long time of begging a light shines down on him from above and a man dressed in white picks him up and he is carried out on a stretcher.
He ends up now in a “hospital”, where people nurse him back to spiritual health. Eventually he figures out hes dead, and is even able to go back to earth as a ghost to try and right some of the wrongs of his life. He basically learns how to be a decent human being. At the end he goes to be reborn on earth with a new found understanding and purpose for life.