Proverbs 17:22 (ESV) … “A joyful heart is good medicine, but a crushed spirit dries up the bones.”
This proverb, along with many others from this book, remind us of the intimate and complex connection between the body and the spirit. One’s inner state of mind and heart seriously affects one’s health and physical vitality.
The ‘joyful heart’ not only ‘makes a cheerful face’ (Prov. 15:13), but ‘good medicine.’ The word translated ‘medicine’ is used only here in the Old Testament. It is, however, related to the word found in Hosea 5:13b: ‘But he is unable to heal [our related word] you, Or to cure you of your wound.’ Here, too, it appears to refer to ‘healing’ in some sense. One’s peace of mind, or lack thereof, seriously affects one’s ability to maintain good health and to recover from ill health (Prov. 12:25; 14:30; 15:13, 30).
The contrast of the first line is seen in the second. A ‘broken spirit’ is descriptive of a depressed state of mind (Prov. 18:14). The dried up bones (Ps. 22:15; 32:3; 37:7–8; Prov. 3:8) are the opposite of ‘fat on the bones’ spoken of positively in other proverbs (Prov. 15:30). A similar expression is ‘rottenness to the bones’ (Prov. 12:4; 14:30).
Even with no family or friends you can be cheerful. However, it is said that one in ten suffer depression at some point and there are many things to crush the spirit. If you have a cheerful heart it is from God. Do as James says: ‘Is anyone happy? Let him sing songs of praise’ (James 5:13).
Although these things are all desirable they are not the most important things in life. Verse 3 makes that clear: ‘The crucible for silver and the furnace for gold, but the Lord tests the heart.’ Here is another warning against superficiality.
There is a peace and quiet that is the quiet of spiritual death. What is the basis of your peace? There is a harmony of sorts in the world. What is the underlying basis of your fellowship with others? Many things can make one cheerful. Do you know the joy beyond understanding that is found only in Christ? We need to know the peace found only in friendship with Christ and the joy of being united to him.
 Kitchen, J. A. (2006). Proverbs: A Mentor Commentary (p. 385). Fearn, Ross-shire, Great Britain: Mentor.  Brady, G. (2003). Heavenly Wisdom: Proverbs Simply Explained (p. 503). Darlington, England: Evangelical Press.