First thing that you have to know is that things that get you off the hook or at least lessen your sentence are called pleas and when you start talking about how much your plea diminishes or negates the gravity of your supposed sentence, it’s called plea bargaining.
Insanity is one of many pleas but is probably among the most used in recent years and even then, at least 4 US states have disqualified the insanity defense. In the Philippines, the exemption is detailed in Item 1, Article 12, Chapter 2 of the Philippine Penal Code.
Art. 12. Circumstances which exempt from criminal liability. — the following are exempt from criminal liability:
1. An imbecile or an insane person, unless the latter has acted during a lucid interval.
When the imbecile or an insane person has committed an act which the law defines as a felony (delito), the court shall order his confinement in one of the hospitals or asylums established for persons thus afflicted, which he shall not be permitted to leave without first obtaining the permission of the same court.
In the context of the penal code, we can see that it illustrates the condition for exemption but not what qualifies for insanity or imbecility.
There are many standards to determine mental incapacity like the M’Naughten standard and Durham rule but it all boils down to what must exist to justify a conviction. Two things have to be proven to qualify a conviction: a suspect must be proven to have both a guilty mind (mens rea) and there must be physical manifestation of the guilty act (actus reus).
Actus reus requires “if someone got murdered, then it can be proven with a dead body.” Pretty straightforward. Mens rea requires “if someone got murdered, it can be proven with the murderer’s conscious intention that he wanted his victim dead.” It is therefore the burden of the Philippine attorney’s defense to prove that mens rea was absent at the time the crime happened to be able to qualify his client and have him be objectified as insane.