Saw the ending for this in the early 80's. His soul is trapped in a box or placed there making him unable to die. Ends with him walking into the street and being messed up by a car hitting him but doesn't die. Can't seem to figure out what it was.
Almost certainly, the 1972 British film; The Asphyx. Sir Hugo Cunningham, a Victorian England scientist and parapsychologist, discovers at the moment of death, a being called a asphx collects the soul of an individual. He theorizes that if the asphyx is trapped, the individual would be immortal. At the end in the 1970's, Cunningham wanders into the path of a car, is crushed, but still alive. Can be seen on Youtube; Asphyx movie