ספר המדות Improper Thoughts / Part I · י
Sefer HaMiddot 741
י. מִי שֶׁמְּקַדֵּשׁ אֶת עַצְמוֹ וְעוֹלֶה עַל מַחֲשַׁבְתּוֹ הִתְפָּאֲרוּת, כְּשֶׁיִּשְׁבּר הַהִתְפָּאֲרוּת, יַשִּׂיג וְיִקְנֶה הַתּוֹרָה.
10. Someone who sanctifies himself, and pride arises in his mind, when he breaks the pride, he attains and acquires the Torah.