סימן סז סעיף ה
מִי שֶׁנּוֹדֵר נְדָרִים כְּדֵי לְתַקֵּן מִדּוֹתָיו, הֲרֵי זֶה זָרִיז וּמְשֻׁבָּח. כֵּיצַד. הֲרֵי שֶׁהָיָה זוֹלֵל, וְנָדַר שֶׁלֹּא יֹאכַל בָּשָׂר אֵיזֶה זְמָן, אוֹ שֶׁהָיָה שׁוֹגֶה בְּיַיִן, וְאָסַר עָלָיו אֶת הַיַּיִן וּשְׁאָר מַשְׁקִין הַמְשַׁכְּרִין וְכֵן מִי שֶׁהָיָה מִתְגָּאֶה בְּיָפְיוֹ וְקִבֵּל עָלָיו נְזִירוּת וְכַיּוֹצֵא בָזֶה, נְדָרִים כָּאֵלּוּ, הֵמָּה עֲבוֹדַת הַשֵּׁם יִתְבָּרַךְ שְׁמוֹ, וְעַל אֵלּוּ אָמְרוּ חֲכָמֵינוּ זִכְרוֹנָם לִבְרָכָה, נְדָרִים סְיָג לִפְרִישׁוּת. וּמִכָּל מָקוֹם גַּם בִּנְדָרִים כָּאֵלּוּ אֵין לוֹ לָאָדָם לְהַרְגִּיל אֶת עַצְמוֹ, אֶלָּא יֵשׁ לוֹ לְהִתְגַבֵּר עַל יִצְרוֹ גַּם בְּלֹא נְדָרִים (ר"ג).
One who makes vows in order to improve his character is considered diligent and praiseworthy. These are examples: A glutton vows to abstain from eating meat for a certain time, or if he was overindulgent in wine he vows to abstain from wine and other intoxicating beverages. Similarly, one was vain about his good looks and took upon himself the nazirite vow.11The nazirite vow requires the shaving off of all his hair at the end of the nazir period. These vows are for the service of God, blessed be His Name, and regarding these situations our Sages said: "Vows are a protective fence for abstinence."12Ethics of the Fathers Chapt. 3, Mishnah 17. Nevertheless, a person should not make it habitual even regarding vows of such nature, but should strive to conquer his vices even without resorting to vows.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)