סימן רא סעיף ג
קָטָן הַמְאַבֵּד אֶת עַצְמוֹ, חָשׁוּב כְּשֶׁלֹּא לָדָעַת. וְכֵן גָּדוֹל אִם נִרְאֶה שֶׁעָשָה הַדָּבָר מֵחֲמַת רוּחַ רָעָה אוֹ שִׁגָּעוֹן וְכַדוֹמֶה, הֲוֵי שֶׁלֹּא לָדָעַת. וְכֵן אִם עָשָׂה אֶת הַדָבָר מֵחֲמַת אֹנֶס, שֶׁהָיָה מִתְיָרֵא מֵעִנּוּיִים קָשִׁים, כְּמוֹ שָׁאוּל שֶׁהָיָה מִתְיָרֵא שֶׁמָּא יַעֲשׂוּ בוֹ הַפְּלִשְׁתִּים כִּרְצוֹנָם, הֲרֵי הוּא כִּשְׁאָר מֵת, וְאֵין מוֹנְעִין מִמֶּנּוּ שׁוּם דָּבָר.
A minor who committed suicide is considered like one who had taken his life unintentionally. Similarly, an adult who committed suicide, and it appears he did so because of severe depression, or madness, and the like, it is considered unintentional. Similarly, if he did so under duress, because he was afraid of torture, like King Saul, who feared what the Philistines might do to him, he is like any other deceased person, and nothing should be withheld from him.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)