When facing criminal charges, you will go in front of a judge and enter a plea. In general, you can plead guilty or not guilty. However, there are many variations of a guilty plea that you can use. One of those is guilty by reason of insanity.
According to FindLaw, a guilty by reason of insanity plea means that you are responsible for the crime but that at the time of the crime, you were mentally unable to understand what you were doing. In short, you were having a mental break of some sort that overrode your sensibilities and made you act in a way you normally would not.
How it impacts your case
Entering an insanity plea is not as simple as entering other types of guilty pleas. Because it will alter the sentencing for your offense, the court must ensure that you truly were mentally unstable at the time of the crime.
Courts use a variety of tests to determine whether they will accept such a plea or not. These tests include determining if you have a mental disease that would impact your impulse control, that would make it impossible for you to understand the impact of your actions, that you could not determine the difference between right or wrong and that you have some type of mental defect.
You will likely have to undergo analysis and testing to allow the court to make a final decision on whether it will accept your plea or not.
Generally, if the court accepts your guilty by reason of insanity plea, you will not have the same sentence you would with other guilty pleas. You will need to receive help for your mental condition. Most often, sentences in such cases are much less severe, especially if you are facing a murder charge.