History House describes Guiteau's trial: "Garfield died on September 19 , sending Guiteau into a short period of fervid prayer. It dawned on Guiteau that his mission really had been divine; after all, how else could God dictate Garfield's death and deny the prayers of so many other god-fearing Americans? On October 14, Guiteau was arraigned..."
His defence: "I plead not guilty to the indictment and my defense is threefold: 1. Insanity, in that it was God's act and not mine. The Divine pressure on me to remove the president was so enormous that it destroyed my free agency, and therefore I am not legally responsible for my act. 2. The president died from malpractice ...if he had been well treated he would have recovered. 3. The president died in New Jersey, and, therefore, beyond the jurisdiction of this court."
The jury was having none of it: "On January 23, the jury deliberated for less than an hour before sending Guiteau to the gallows. Even after the sentencing, he tried to cash in on his new-found celibrity. He tried to sell the suit he shot Garfield in for $100; he sold his autographs or autographed pictures ($9 a dozen, advertised in local newspapers).
"On June 30, he awoke to be led to his death. He requested the flowers doubtlessly sent by his legions of admirers be sent to his cell, only to be told there were none. He recited an interminable, repetitious, self-penned poem while standing before the noose ("I am going to the Lordy, I am so glad/ I am going to the Lordy, I am so glad/ I am going to the Lordy, I am so glad," etc.), and the State promptly stretched his neck for the assassination of President James A. Garfield. The crowd of thousands cheered."
The full article is here.