The Shulchan Aruch · Orach Chayim
אורח חיים צ״גOrach Chayim 93
Siman 93 of 697 in Orach Chayim — 4 se'ifim
הלכות תפילהLaws of Prayer· siman 93
Se’if 1א׳
יִשְׁהֶה שָׁעָה אַחַת קֹדֶם שֶׁיָּקוּם לְהִתְפַּלֵּל, כְּדֵי שֶׁיְּכַוֵּן לִבּוֹ לַמָּקוֹם; וְשָׁעָה אַחַת אַחַר הַתְּפִלָּה, שֶׁלֹּא תְּהֵא נִרְאֵית עָלָיו כְּמַשּׂאוֹי שֶׁמְּמַהֵר לָצֵאת מִמֶּנָּה.
Before One Prays, One Needs to Wait: containing 4 s'ifim. One should wait one [halakhic] hour before he rises to pray [the Amidah] in order to focus his heart to the Omnipresent. And [one should wait] one [halakhic] hour after the prayer, so that it should not seem like a burden to him, that he is quick to leave it.
Se’if 2ב׳
לֹא יַעֲמֹד לְהִתְפַּלֵּל אֶלָּא בְּאֵימָה וְהַכְנָעָה, לֹא מִתּוֹךְ שְׂחוֹק וְקַלּוּת רֹאשׁ וּדְבָרִים בְּטֵלִים וְלֹא מִתּוֹךְ כַּעַס, אֶלָּא מִתּוֹךְ שִׂמְחָה כְּגוֹן: דִּבְרֵי תַּנְחוּמִין שֶׁל תּוֹרָה סָמוּךְ לִגְאֻלַּת מִצְרַיִם אוֹ סָמוּךְ לִתְהִלָּה לְדָוִד שֶׁכָּתוּב בּוֹ: רְצוֹן יְרֵאָיו יַעֲשֶׂה, שׁוֹמֵר ה' אֶת כָּל אֹהֲבָיו (תְּהִלִּים קמה יט כ).
One should stand to pray with reverence and humility and not in the midst of laughter, frivolity or purposeless matters, and not in the midst of anger. Rather [he should pray] in the midst of joy, like the words of comfort from the Torah, for example those that follow the redemption from Egypt [i.e. the blessing after the Recitation of the Sh'ma] or that follow Tehila l'David [i.e. Psalm 145], where it is written in it "He will do the will of those who revere Him" [and] "Hashem guards all those who love Him." [Psalms 145:19-20].
Se’if 3ג׳
אֵין עוֹמְדִים לְהִתְפַּלֵּל מִתּוֹךְ דִּין, וְלֹא מִתּוֹךְ הֲלָכָה שֶׁלֹּא יְהֵא לִבּוֹ טָרוּד בָּהּ, אֶלָּא מִתּוֹךְ הֲלָכָה פְּסוּקָה. הַגָּה: וְהַיְנוּ נָמֵי כְּמוֹ מִתּוֹךְ שִׂמְחָה, כִּי פִּקּוּדֵי ה' יְשָׁרִים מְשַׁמְּחֵי לֵב (תְּהִלִּים יט, ט) (טוּר).
We do not stand to pray in the midst of (ie. immediately after) judging a case, or in the midst of [studying] Jewish law, so that one's heart will not be troubled with it (ie. he will be distracted by it), rather [we stand to pray] in the midst of [studying] conclusive Jewish law. Rem"a: For this is also like being in the "midst of joy", because of [the verse] "the precepts of Hashem are upright, delighting the heart" [Psalms 19:9] (Tur, Orach Chaim 93:1)
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0