The Shulchan Aruch · Yoreh De'ah
יורה דעה של״חYoreh De'ah 338
Siman 338 of 402 in Yoreh De'ah — 2 se'ifim
הלכות ביקור חולים ורפואה ונוטה למות וגוססVisiting the Sick· siman 338
Se’if 1א׳
נָטָה לָמוּת, אוֹמְרִים לוֹ: הִתְוַדֶּה, וְאוֹמְרִים לוֹ: הַרְבֵּה הִתְוַדּוּ וְלֹא מֵתוּ, וְהַרְבֵּה שֶׁלֹּא הִתְוַדּוּ, מֵתוּ, וּבְשָׂכָר שֶׁאַתָּה מִתְוַדֶּה אַתָּה חַי, וְכָל הַמִּתְוַדֶּה יֵשׁ לוֹ חֵלֶק לָעוֹלָם הַבָּא. וְאִם אֵינוֹ יָכוֹל לְהִתְוַדּוֹת בְּפִיו, יִתְוַדֶּה בְּלִבּוֹ. וְאִם אֵינוֹ יוֹדֵעַ לְהִתְוַדּוֹת, אוֹמְרִים לוֹ: אֱמֹר: מִיתָתִי תְּהֵא כַּפָּרָה עַל כָּל עֲוֹנוֹתַי (טוּר). וְכָל אֵלּוּ הַדְּבָרִים אֵין אוֹמְרִין לוֹ בִּפְנֵי עַמֵּי הָאָרֶץ, וְלֹא בִּפְנֵי נָשִׁים, וְלֹא בִּפְנֵי קְטַנִּים, שֶׁמָּא יִבְכּוּ וְיִשְׁבְּרוּ לִבּוֹ.
Say to someone who is leaning towards death: confess! Say to him: many have confessed and they will not die, and many that do not confess, they will die, and in the wage that you confess you live, and all that have confessed that is his part in the world to come. And if one is not able to confess by his own mouth, he can confess in his heart. And if he is not able to know how to confess, say to/for him: “I say: .” And if he is unable to do all these things, is not able to say to him before ordinary people, and not before women, and not before minors, lest they weep/mourn and his heart breaks.
Se’if 2ב׳
סֵדֶר וִדּוּי שְׁכִיב מֵרַע: מוֹדֶה אֲנִי לְפָנֶיךָ ה' אֱלֹהַי וֵאלֹהֵי אֲבוֹתַי שֶׁרְפוּאָתִי וּמִיתָתִי בְּיָדְךָ, יְהִי רָצוֹן מִלְּפָנֶיךָ שֶׁתְּרַפְּאֵנִי רְפוּאָה שְׁלֵמָה, וְאִם אָמוּת, תְּהֵא מִיתָתִי כַּפָּרָה עַל כָּל חֲטָאִים וַעֲוֹנוֹת וּפְשָׁעִים, שֶׁחָטָאתִי וְשֶׁעָוִיתִי וְשֶׁפָּשַׁעְתִּי לְפָנֶיךָ, וְתֵן חֶלְקִי בְּגַן עֵדֶן, וְזַכֵּנִי לָעוֹלָם הַבָּא הַצָּפוֹן לַצַּדִּיקִים. וְאִם רוֹצֶה לְהַאֲרִיךְ כְּוִדּוּי יוֹם כִּפּוּר, הָרְשׁות בְּיָדוֹ (כָּל בּוֹ).
The order of Vidui, the deathbed confession, that is done by a companion: “I acknowledge you, Adonai, my God and God of my ancestors, that my healing and my death are in Your hands. May it be your will before You that I be healed to a complete healing, and if I die, may I be absolved for all of my sins and sufferings and crimes, as I sinned and suffered and did crimes before You, and may my portion be in the Garden of Eden, and may I merit the world to come which is hidden away for the righteous.” And if he wants to lengthen like the confession of Yom Kippur, the permission is in his hand.
Shulchan Aruch, Yoreh De'ah — Torat Emet 357 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0