Find a Lawyer
When it comes to crimes against persons (assault, homicide, etc.) there are quite a few defenses available.
Self-defense is an affirmative defense to many crimes, meaning that, if the prosecution proves all of the elements of the crime, the defendant can still be found not guilty, if they prove all the elements of an affirmative defense.
For example, in any crime of violence against another person, the defendant can be acquitted if they can prove that they acted in self-defense.
To count as self-defense, the force used against the aggressor must be reasonable, given the circumstances. For example, in order to be justified in the use of lethal force, one must reasonably believe that they are faced with serious bodily injury or death if they do not defend themselves.
If a person is faced with a threat of harm which is clearly not lethal (for example, someone is throwing punches at you), you have the right to defend yourself, but not with lethal force. You are only allowed to use the bare minimum amount of force necessary to defend yourself.
If a person is legally insane while they commit a crime, and the crime has intent, or some other culpable mental state, as one of its elements, they may be able to mount a successful insanity defense.
For example, murder requires, among other things, that the killer acted with intent to kill, or some other highly culpable mental state. However, what if the killer is so mentally ill that they have no idea what they're doing and, therefore, can't form the required intent? This would be a perfect example of when his or her lawyer should try the insanity defense.
You should note that "insanity" has a very specific legal definition, which bears little relation to the word's medical or psychiatric definition. "Mentally ill" is not the same thing as "insane," as far as the law is concerned.
To have a chance at mounting a successful insanity defense, it must be shown that the defendant suffered from some kind of mental illness, and, because of that mental illness, was unable to comprehend the nature of their conduct at the time they committed the crime, or was completely incapable of conforming their conduct to the law. This is not an easy test to meet. In fact, in the U.S., less that 1% of criminal defendants even attempt an insanity defense. And less than 25% of those who do attempt it are successful. Needless to say, it's not a get-out-of-jail-free card.