Please help, I'm stuck

I'm a 25 year old father to 2 children. With the same woman.

She’s currently pregnant with my 3rd. But she doesn’t want anything to do with me. She is constantly putting me down as a father but will not have me anywhere near her. I’ve been forced back to my mother’s home. I message her everyday asking about the children, I get near to nothing in response. I ask to see the kids atleast once a day, when I finish work, or whenever I’m OK to come over. All I get is no. She keeps telling me to take her to court, which I feel there’s no need, I’m a good dad. I provide and give everything to my children. I think it’s more of a personal thing between me and her but I just don’t know what it is.
But all I know is that my kids go days sometimes weeks before I’m allowed to see them.

I will admit, I haven’t been great. I suffer with depression and anxiety and I feel has taken over my daily life for the past 5-6 years. Sometimes I’m great, happy… life is bright. But 80% of the time, I struggle. And it makes me think its taken a subconscious effect on my family.

I’m trying so hard to work on myself for the sake of my family. Cut a long story short, I’m literally pining for my family. I love my kids more then anything, they are what keep me going.

How can I fix this? How can I get my family back?