The Ninth Configuration (1980)

An ex-marine psychiatrist attempts to rehabilitate his patients by indulging their fantasies, and seeks to prove the existence of a loving God to one especially troubled inmate.