Initially, just listen and don’t say anything
When someone is having a bad day, they often need to vent…to tell their story. Interrupting them with your advice may not be appropriate.
Once you’ve heard about why they are having a bad day, you can determine how serious their situation is. Are they upset because they didn’t get the raise they wanted, or, because their pet died? Each might get a different response from you.
If you are physically with them, in the first case you might want to treat them to lunch or a movie. In the latter case, you might want to embrace and comfort them in their loss by acknowledging how wonderful their pet was and to encourage them to talk about all the good times they had together.
And if you are not physically with them, a hand-written card or letter (not an email), or a phone call is in order just to let them know you are there for them.
Full article found here: https://upjourney.com/what-to-say-when-someone-is-having-a-bad-day