i believe he will be hard pressed to prove thatof course that will only be valid in the state courts not sure how it works for the federal charges he is facingThe Insanity Defense Among the States - Criminal Law
ARIZONA The state uses a modified version of the M'Naghten Rule. The burden of proof is on the defendant. A guilty but insane verdict is allowed.
M'Naghten Rules - Wikipedia, the free encyclopedia
The Federal process is similar, he will plead not guilty but probably change it to not guilty by reason of insanity. There's a procedure that has to be followed, the Federal Rule of Criminal Procedure pretty much sets out everything that has to happen, how and when evidence of his mental state is disclosed to the prosecution and the Court, and other goodies:
Federal Rules of Criminal Procedure - Rule 12.2
The Federal standard is similar to the AZ law:
§ 17. Insanity defense
(a) Affirmative Defense.— It is an affirmative defense to a prosecution under any Federal statute that, at the time of the commission of the acts constituting the offense, the defendant, as a result of a severe mental disease or defect, was unable to appreciate the nature and quality or the wrongfulness of his acts. Mental disease or defect does not otherwise constitute a defense.
(b) Burden of Proof.— The defendant has the burden of proving the defense of insanity by clear and convincing evidence.
United States Code: Title 18,17. Insanity defense | LII / Legal Information Institute
with all the stuff he posted online before doing it
he knew what he was going to do, and even told his friends "goodbye"