(יד) וְר֧וּחַ יי סָ֖רָה מֵעִ֣ם שָׁא֑וּל וּבִֽעֲתַ֥תּוּ רֽוּחַ־רָעָ֖ה מֵאֵ֥ת יי (טו) וַיֹּאמְר֥וּ עַבְדֵֽי־שָׁא֖וּל אֵלָ֑יו הִנֵּה־נָ֧א רֽוּחַ־אֱלֹהִ֛ים רָעָ֖ה מְבַעִתֶּֽךָ׃ (טז) יֹאמַר־נָ֤א אֲדֹנֵ֙נוּ֙ עֲבָדֶ֣יךָ לְפָנֶ֔יךָ יְבַקְשׁ֕וּ אִ֕ישׁ יֹדֵ֖עַ מְנַגֵּ֣ן בַּכִּנּ֑וֹר וְהָיָ֗ה בִּֽהְי֨וֹת עָלֶ֤יךָ רֽוּחַ־אֱלֹהִים֙ רָעָ֔ה וְנִגֵּ֥ן בְּיָד֖וֹ וְט֥וֹב לָֽךְ׃ (כג) וְהָיָ֗ה בִּֽהְי֤וֹת רֽוּחַ־אֱלֹהִים֙ אֶל־שָׁא֔וּל וְלָקַ֥ח דָּוִ֛ד אֶת־הַכִּנּ֖וֹר וְנִגֵּ֣ן בְּיָד֑וֹ וְרָוַ֤ח לְשָׁאוּל֙ וְט֣וֹב ל֔וֹ וְסָ֥רָה מֵעָלָ֖יו ר֥וּחַ הָרָעָֽה׃ (פ)

(14) Now the spirit of the LORD had departed from Saul, and an evil spirit from the LORD terrified him. (15) And Saul’s servants said unto him: ‘Behold now, an evil spirit from God terrifieth thee. (16) Let our lord now command thy servants, that are before thee, to seek out a man who is a skilful player on the harp; and it shall be, when the evil spirit from God cometh upon thee, that he shall play with his hand, and thou shalt be well.’ (23) And it came to pass, when the [evil] spirit from God was upon Saul, that David took the harp, and played with his hand; so Saul found relief, and it was well with him, and the evil spirit departed from him.

ת"ר איזהו שוטה היוצא יחידי בלילה והלן בבית הקברות והמקרע את כסותו איתמר רב הונא אמר עד שיהו כולן בבת אחת ר' יוחנן אמר אפי' באחת מהן היכי דמי אי דעביד להו דרך שטות אפי' בחדא נמי אי דלא עביד להו דרך שטות אפילו כולהו נמי לא לעולם דקא עביד להו דרך שטות והלן בבית הקברות אימור כדי שתשרה עליו רוח טומאה הוא דקא עביד והיוצא יחידי בלילה אימור גנדריפס אחדיה והמקרע את כסותו אימור בעל מחשבות הוא כיון דעבדינהו לכולהו הוה להו

Our Rabbis have taught, What is a "shoteh" [translated until now as a mentally ill person]? He who goes out alone at night, and he who sleeps in a cemetery, and he who tears his clothes. It is stated: R. Hunna said, So long as they all take place at one time. R. Yochanan said, Even [only] one of them. What is this case? If he have done them in the way of folly, even one [is enough to declare him a mentally ill person]. If he have not done them in the way of folly, even [doing] all of them are not [enough to declare him a mentally ill person].

ט) השוטה פסול לעדות מן התורה לפי שאינו בן מצות ולא שוטה שהוא מהלך ערום ומשבר כלים וזורק אבנים בלבד אלא כל מי שנטרפה דעתו ונמצאת דעתו משובשת תמיד בדבר מן הדברים אע"פ שהוא מדבר ושואל כענין בשאר דברים הרי זה פסול ובכלל שוטים יחשב הנכפה בעת כפייתו פסול ובעת שהוא בריא כשר

(י) הפתאים ביותר שאין מכירין דברים שסותרין זה את זה ולא יבינו עניני הדבר כדרך שמבינין שאר עם הארץ

A fool is unable to testify because he is not required to perform commandments. A fool is not just someone who walks about naked, or breaks things, or throws stones, but includes everyone who's thought process has become negatively altered, or who is perpetually confused in a particular matter, even though he can speak and ask questions in all other areas. And this also includes someone who has episodes, but is otherwise normal. And a simpleton is someone who cannot understand when things contradict, and doesn't understand things the way other people understand them.

at the time of committing the act, the accused was laboring under such a defect of reason, from"..." disease of the mind, as not to know the nature and quality of the act he was doing or, if he did know it, that he did not know what he was doing was wrong

The Durham rule states "that an accused is not criminally responsible if his unlawful act was the product of mental disease or mental defect.

The Model Penal Code, published by the American Law Institute, provides a standard for legal insanity that serves as a compromise between the strict M'Naghten Rule, the lenient Durham ruling, and the irresistible impulse test. Under the MPC standard, which represents the modern trend, a defendant is not responsible for criminal conduct "if at the time of such conduct as a result of mental disease or defect he lacks substantial capacity either to appreciate the criminality of his conduct or to conform his conduct to the requirements of the law." The test thus takes into account both the cognitive and volitional capacity of insanity.

“Did you warn him?... Did he accept the warning? Did he admit his liability to death? Did he commit the murder within the time needed for an utterance {to remain in effect}” (Ibid, 40b).