I think it can be important to validate our kids emotions. They won’t always be happy and it is not our role to always keep them happy. You might say something like, “I’m sorry to hear you are feeling sad right now.” If you don’t know why he is sad perhaps you might add, “What is making you feel sad at this moment?” – this helps not only you understand him better, but it helps him develop some emotional intelligence. I would follow up with something like, “What helps the most when you are feeling this way?” The idea is to get him to think about behaviors/actions he can do to take care of himself when he has those feelings.
Also, if he repeatedly has to tell you he is sad and wants you to respond in a very specific way, it would be more of a red flag for a compulsion and not a true discussion.