To avoid an imminent bankruptcy, the "Planet Express" is converted into an ai...
Futurama
Season 8 Episode 3: Ghost in the Machines
Fry believes that a human life is more important than a robot life, so Bender decides to kill himself again, only this time he really follows through. But instead of dying he turns into a ghost that haunts Fry.