“The heart of the wise is in a house of mourning, and the heart of fools in the house of rejoicing” (Ecclesiastes 7:4). “The heart of the wise is in a house of mourning.” Rabbi Yitzḥak said: This is analogous to one who said to his servant: ‘Go out and bring me a fine object.’ He said to him: ‘Where do I find a fine object?’ He said to him: ‘Where you find a multitude of people going, there is a fine object.’
The Heart of the Wise Dwells in the House of Mourning
Kohelet Rabbah 4:1