סימן קצד סעיף ו
וְכָל הָעוֹמְדִין עַל הַמֵּת בִּשְׁעַת יְצִיאַת נְשָׁמָה, חַיָבִין לִקְרֹעַ. הָא לְמַה זֶּה דוֹמֶה, לְסֵפֶר תּוֹרָה שֶׁנִּשְׂרָף, שֶׁאֵין רֵיק בְּיִשְֹרָאֵל שֶׁאֵין בּוֹ תּוֹרָה וּמִצְוֹת. וַאֲפִלּוּ עַל קָטֹן שֶׁלָּמַד מִקְרָא אוֹ עַל אִשָּׁה חַיָבִין לִקְרֹעַ. וַאֲפִלוּ הָיָה זֶה הַמֵּת לִפְעָמִים עוֹשֶׂה עֲבֵרָה לְתֵּאָבוֹן, חַיָבִין לִקְרֹעַ עָלָיו. אֲבָל אִם הָיָה רָגִיל לַעֲשׂוֹת עֲבֵרָה, אֲפִלּוּ רַק לְתֵאָבוֹן, הֲרֵי זֶה בִּכְלַל הַפּוֹרְשִׁים מִדַּרְכֵי הַצִּבּוּר, שֶׁאֵין קוֹרְעִין עָלָיו. וּקְרִיעָה זוֹ שֶׁעַל הַמֵּת שֶׁאֵין מִתְאַבְּלִים עָלָיו אֶלָּא שֶׁקּוֹרְעִין מִפְּנֵי שֶׁעוֹמְדִין בִּשְׁעַת יְצִיאַת נְשָׁמָה, סַגֵּי בִּקְרִיאָה מֻעֶטֶת. וַאֲפִלּוּ מִן הַצַּד אוֹ בְּשׁוּלֵי הַבֶּגֶד סַגֵּי.
All those attending the deceased when the soul departs, must tear their garments.5According to Zohor L’Avrohom, our custom is that those who are present when the soul departs do not tear their garments. The reason is that we do not want the person to die alone, as people will not want to be present if it means tearing their garments. To what is this [death] compared? To the burning of a Seifer Torah, for there is no one in Yisrael who is [totally] void of Torah knowledge and the performance of mitzvos. Even at the death of a child who studied Scriptures, or at the death of a woman, the garments must be torn. Even if the deceased had at times committed a sin to satisfy his lustful desire, the garments must be torn at his death. However if the person committed a sin regularly, even though he did so only to satisfy his lustful desire, he is considered among those who have departed from the ways of the community, and the garments are not torn at his death. Regarding the tearing of the garments at the death of one for whom you are not a mourner, and you are tearing your garment only because you are present at the time of the soul's departure, it is sufficient if you make a slight tear, even at the side or at the hem.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)