Great that you are seeing some improvement in your dog's behavior
Sometimes we place responsibilities on our dogs that we are unaware of
responsibilities that they are neither equiped or prepared to take on
You said that you were depressed and that he became very important to you during that time
Unfortunately he saw that and he became for better or worse
your protector
That sounds like it might be a good thing but it made him frightened and confused .... this isn't a dog's world and he can't cope under those conditions making him act out aggressively
Now that you are better it's time to take back your role as leader and it's time to become his protector now ... as it should be
Enjoy each other