he suddenly remembered a note on mental illness he had taken for the first misery book , where much of the action had been set in london 's bedlam hospital ( misery had been railroaded there by the madly jealous villainess ) .