22 A merry heart doeth good like a medicine: but a broken spirit drieth the bones.
Note, 1. It is healthful to be cheerful. The Lord is for the body, and has provided for it, not only meat, but medicine, and has here told us that the best medicine is a merry heart, not a heart addicted to vain, carnal, sensual mirth; Solomon himself said of that mirth, It is not medicine, but madness; it is not food, but poison; what doth it? But he means a heart rejoicing in God, and serving him with gladness, and then taking the comfort of outward enjoyments and particularly that of pleasant conversation. It is a great mercy that God gives us leave to be cheerful and cause to be cheerful, especially if by his grace he gives us hearts to be cheerful. This does good to a medicine (so some read it); it will make physic more efficient. Or it does good as a medicine to the body, making it easy and fit for business. But, if mirth be a medicine (understand it of diversion and recreation), it must be used sparingly, only when there is occasion, not turned into food, and it must be used medicinally, sub regimine–as a prescribed regimen, and by rule.
2. The sorrows of the mind often contribute very much to the sickliness of the body: A broken spirit, sunk by the burden of afflictions, and especially a conscience wounded with the sense of guilt and fear of wrath, dries the bones, wastes the radical moisture, exhausts the very marrow, and makes the body a mere skeleton. We should therefore watch and pray against all melancholy dispositions, for they lead us into trouble as well as into temptation.
– Matthew Henry Commentary