Answer: Diminished responsibility.
Diminished responsibility is a defense by excuse in which the defendant argues that although he broke the law, his mental functions were "diminished" (impaired) and therefore should not be held fully criminally liable for doing so.
It is not accepted in all jurisdictions, either in America or abroad.