I asked him [Martin Luther] about a certain man who, when he had a stomachache for several days and as a consequence had pain in his head and was confused in his thoughts, got the notion and was afraid that he was falling into a state of melancholy. He disclosed his anxiety to me and asked that I notify the doctor, whereupon he [Martin Luther] responded with these words: “When the devil can bring this about, it means that imagination has produced the effect. On this account his thoughts ought to be changed. He ought to think about Christ. You should say to him, ‘Christ lives. You have been baptized. God is not a God of sadness, death, etc., but the devil is. Christ is a God of joy, and so the Scriptures often say that we should rejoice, be glad, etc. This is Christ. Because you have a gracious God, he won’t take you by the throat.’
“A Christian should and must be a cheerful person. If he isn’t, the devil is tempting him. (Luther’s Works, v. 54, p.95)