Try ignoring his behaviour and him for a day or two. Stop doing things for him, something as simple as putting his clothes in the washing machine will be enough. Go on stike, don't do any clearing up or cleaning for a couple of days, i know that will be difficult but he will soon realise then just what you do for him. Or do as he is doing, be moody and grumpy with him and sulk and sit staring into space. When your child is around just be as you would around him/her so not to upset him/her.
Ive done this myself and it has worked. It's worth a try. Some men are like that sometimes, but it could be because he misses his old job, whatever that was. You could start by sitting him down and getting him to talk to you, just you two alone with the tv off, threaten to tell his family, that may just be enough to get him talking, ive used that many times and it always works. All of my suggestions stem from a previous relationship, i gave up in the end and found someone else but hopefully you can help him sort things out. good luck