Yes, I think you can fix this.
However, you will have to show him the measures that you are about to take in order to overcome your mental issues.
Then you will have to actually show him through your actions that you have improved.
He is mad at you right now but he will eventually get over that.
What you should avoid doing right now is constantly reaching out to him to try to get him to talk to you. That will only remind him more so of the fact that you locked him out of the house and he will get even more upset.
Eventually, he is going to come home.
When he does, you have to have already started your psychology appointments with paperwork to prove it. He has to see that you are truly making an effort to overcome your mental issues. From here, he has to see a change in your actions.
Then and only then would you have a chance to fix this.