The extreme emotional disturbance defense, if proven by the defense, would only reduce the charge from murder to manslaughter but there would still be a criminal conviction and a jail term.
Mental disease or defect (the technical name for the insanity defense in New York), if proven, would then result in hearings as to the defendant's present mental condition and potentially involuntary commitment.