Just be supportive about the job loss - in a “we’ll get through this together” kind of way. I don’t know if this was a mass layoff or if they fired HIM, but if it’s the latter, it may have to do with his affair or with his bad attitude about his coworkers. When my exH was going through his first MLC (one at 40, one at 50!) his work actually sent him to anger management classes.
Are you working outside the home? If not, is it feasible for you to go out and get a job? Sounds like he ought to be able to get another job but depending on his age and industry, it may not be as easy to achieve his previous pay scale. If the marriage is already in shaky ground, you want to start getting your financial ducks in a row, including an income that could support you if necessary.
How much do you really know about your finances? If you haven’t been the one handling the money, I suggest you find out everything you can about how much there is in assets and debts. Run a credit check. He sounds a bit like my narcissistic ex - fortunately, I handled all the finances in the marriage.
You will suddenly be spending a lot more time with him than you did before. You can use this to your advantage to let him see the new and improved you. You can “stage” your home to be warm and welcoming. Model happiness. Act As If, even if your heart is breaking. Live your life. Try new things. Create a life for yourself that he might be interested in joining.