Simple. I got very bored and depressed, so I went and plugged myself in to its external computer feed. I talked to the computer at great length and explained my view of the Universe to it," said Marvin. "And what happened?" pressed Ford. "It committed suicide," said Marvin and stalked off back to the Heart of Gold.
Douglas Adams (2012). “The Hitchhiker's Guide to the Galaxy: The Trilogy of Five”, p.138, Pan Macmillan