Marvin is my HERO.
I just got through reading the part where Ford, Arthur, Trillian, and Zaphoid were being shot at by the galactic police, when suddenly they just killed over on account of their methane-breathing tanks shutting down which were supported by the police ship's computer. When they rushed out of the building back to the Heart of Gold, they see the Police ship by it dead. Beside it, is Marvin lying face down in the dirt. He admits to pluging into the ship's computer and talking to it.
Arthur asked, "What did you say to it?"
"I talked to it about my views on the Universe."
"Yes? Then what happened?"
"It commited suicide."