Here the word "heart" represents the person. Alternate translation: "When a person is joyful, his face is cheerful" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
The writer speaks of a person being discouraged as if that person's spirit were an object that is crushed. See how you translated this in [Proverbs 15:4](../15/04.md). Alternate translation: "makes a person discouraged" (See: [[rc://en/ta/man/translate/figs-metaphor]])