"The execution of those with mental illness or "the insane" is clearly prohibited by international law. Virtually every country in the world prohibits the execution of people with mental illness.
The UN Safeguards Guaranteeing Protection of the Rights of those Facing the Death Penalty, adopted by the UN Economic and Social Council resolution of May 25, 1984, states: "…nor shall the death sentence be carried out…on persons who have become insane."
In 1997, the UN Special Rapporteur on Extrajudicial, Summary or Arbitrary Executions stated that governments that continue to use the death penalty "with respect to minors and the mentally ill are particularly called upon to bring their domestic legislation into conformity with international legal standards."
In April 2000, the UN Commission on Human Rights urged all states that maintain the death penalty "not to impose it on a person suffering from any form of mental disorder; not to execute any such person." "
http://www.amnestyusa.org/abolish/mental_illness.html