Kitzur Likutei Moharan I, 29:16
And the thought in the brain is according to the character traits (middot) in a person, for according to the trait that a person holds, so the thoughts in the brain pass and go over him. And this is the aspect of "the seven locks of his head", and they are the aspect of the mentalities, for the hairs are an aspect of the surplus of the mentalities, as mentioned above, the aspect of the seven traits that pass through the thought in the brain. And when one blemishes the hairs, the sight is blemished, which is the seven layers of the eye. And likewise the reverse: through the rectification of the seven layers of the eye, one rectifies the blemish of the seven locks of his head, which are the hairs, in the aspect of the rectification of the mentalities, as mentioned above.
View original Hebrew
וְהַמַּחֲשָׁבָה שֶׁבַּמּחַ הִיא כְּפִי הַמִּדּוֹת שֶׁבָּאָדָם שֶׁכְּפִי הַמִּדָּה שֶׁהָאָדָם אוֹחֵז בָּהּ כֵּן חוֹלְפִין וְעוֹבְרִין עָלָיו הַמַּחֲשָׁבוֹת שֶׁבַּמּחַ. וְזֶה בְּחִינַת "שֶׁבַע מַחְלְפוֹת ראשׁוֹ" וְהֵם בְּחִינַת הַמּחִין כִּי הַשְׂעָרוֹת הֵם בְּחִינַת מוֹתְרֵי מחִין כַּנַּ"ל בְּחִינַת שֶׁבַע מִדּוֹת שֶׁעוֹבְרִין בַּמַּחֲשָׁבָה שֶׁבַּמּחַ וּכְשֶׁפּוֹגְמִין בַּשְׂעָרוֹת נִפְגָּם הָרְאִיָּה שֶׁהִיא שִׁבְעָה גִּלְדֵי עֵינָא, וְכֵן לְהֵפֶךְ עַל יְדֵי תִּקּוּן שִׁבְעָה גִּלְדֵי עֵינָא מְתַקְּנִין פְּגַם הַשֶּׁבַע מַחְלְפוֹת ראשׁוֹ שֶׁהֵם הַשְׂעָרוֹת בִּבְחִינַת תִּקּוּן הַמּחִין כַּנַּ"לRead this passage within Part I · Torah 29, in its full context