Here are my two thoughts. They are just a starting point. Other people will surely have more.

First, is he able to tell you anything about while he feels so bad? Can you ask him directly? "Gee, you just seem like you are having a lot of bad days. It makes me sad that you feel bad. Do you know what is wrong?"

Second, when DS went through these spells (mostly when he was four), my first instinct was to punish and yell and reason with him. But what actually worked was to keep my mouth shut and give him a really big long hug. Lots of touching and affection throughout the day to reassure him that he was safe went a long way.

Just the first 2 things that popped into my mind....