Rabbi Simcha Bunim, may the memory of the righteous be for a blessing, had a famous oral teaching:
Everyone must have two pockets, with a note in each pocket, so that he or she can reach into the one or the other, depending on the need. When feeling lowly and depressed, discouraged or disconsolate, one should reach into the right pocket, and, there, find the words: “For my sake was the world created.”
But when feeling high and mighty one should reach into the left pocket, and find the words: “I am but dust and ashes.”*