"A merry heart doeth good like a medicine," Proverbs 17:22.
Our youngest son coined a term a few months ago after he took a bus ride, bus cancer. After his return home, he was sick in bed for a week. Since I don't ride busses anymore, I've adopted the term with a bit of change. I call it travel cancer. Yes, we enjoyed the wedding. However, we were sick when we returned for a few days. Aaargh!
Is it possible to be cheerful even when not well? It is. Recognize that you aren't up to par. Relabel grumpiness as fatigue/illness/pain/etc. Refuse to allow yourself to become offended at the behavior of others or to misbehave, since you aren't thinking correctly. Repent of poor behavior; pray for strength, mercy, and grace. Receive help gracefully. Moving forward, refocus your efforts and behavior; take it easy and get some rest. "The past is to be learned from but not lived in," Jeffrey R. Holland.
Because we are all given free agency, we can change bad habits, end unhealthy thinking, and take control or our lives. God blesses those who are anxiously engaged in a good cause. One very good cause is learning to prevent negative, habitual responses and replace them with new positive behaviors.