I think one of the reasons I'm not sunk in deep depression is because I have to keep the dog happy. Left alone he veers between cross, scared then depressed by the current weather.He lays with head on paws and sighs, lots. I can usually cheer him up by tickling him or coaxing him into a game and I talk to him to keep his spirits up.
Another reason I'm staying cheerful is that when I feel the chill gloom of depression trying to pull me close I make a big effort to go and do something. I write or I cook or I clean something. I don't enjoy the cleaning trick ,but it does work, so my place is not too bad dirt-wise.
The main reason I keep going is because I want to be happy and purposeful and make my life mean something.
I found this pic recently and I think the words apply to freedom of mind in my case. If I'm depressed I'm not free.I cultivate my freedom by constant practice and I'm able to do that because of the Friend.
Rumi talks a lot about the Friend. I think he saw God as a friend who encouraged him when things went wrong; of course Rumi talks incessantly of the Divine as Lover, but you can only expect a lover to arrive if you're in a fit state to be loved. I'm not a Sufi mystic and don't expect to be caught up in that whirling ecstasy, but I feel that if friendship with the Divine was good enough for Rumi it'll do for me too.God does not solve my problems, but he gives me the desire to overcome them.
I'm not sure any of that explains anything, but I'm not a theologian either.