Guarded boyfriend

My boyfriend of almost 4 years has not been expressing much emotion lately. He’s guarded and doesn’t really show me that he loves me but I know that he does. When we have arguments, he fights against me instead of with me to resolve the issues. He seems to have been giving his friends priority over our relationship as well and it hasn’t been like that before. Also, he has the urge to speak to other girls and their conversations are much more lively than ours. He doesn’t participate in our conversations as much as I would like him too and then claims that he has nothing to say when I clearly have a lot to say to him but he doesn’t cooperate. I have spoken to him about it so speaking about it isn’t going to help.

I’m not sure if he’s depressed or going through something because he doesn’t really tell me how he feels. I’ve always tried my best to be the best girlfriend.

I need to mention that I’m depressed as well and I’ve been through a lot that was caused by him flirting with others/meeting up secretly etc. he claimed that they were harmless and just platonic however I don’t feel comfortable with that and it’s given me self esteem and insecurity issues.

What could be the reason for him shutting me off? And how can I make him express his love for me more?