Ecclesiastes 7:3

It is better to go to a house of mourning, than to a house of feasting. For in the former, we are admonished about the end of all things, so that the living consider what may be in the future

Other versions

King James Version

Sorrow is better than laughter: for by the sadness of the countenance the heart is made better.

English Standard Version

Sorrow is better than laughter, for by sadness of face the heart is made glad.

New International Version

Sorrow is better than laughter, because a sad face is good for the heart.