Since you two are about to legally separate then it makes some sense that he tries his best to not be around you at all.
To a certain point.
However since you share mutual children, then I think he should spend less time in his bedroom alone.
Sure....
He could very well be depressed.
After all his love life is not working out.
You can always encourage him to seek help, but it must be something that he wants to do for himself.
Hope this helps.