Behaviour therapy would say that it worked because you took some action to improve your life and counter the depression. (Even cognitive therapy says that small, meaningful actions can have a dramatic impact on one's depression). The motivation and action of fasting, and the positive and noticeable / observable physical effects of fasting changed your focus from your depression, which alleviated your depressive symptoms. Once depression alleviates, you start thinking more clearly (make less cognitive distortions in your thinking) which further leads to a 'normal' mental state of well-being (in an otherwise mentally healthy individual).
Behaviour therapy would say that it worked because you took some action to improve your life and counter the depression. (Even cognitive therapy says that small, meaningful actions can have a dramatic impact on one's depression). The motivation and action of fasting, and the positive and noticeable / observable physical effects of fasting changed your focus from your depression, which alleviated your depressive symptoms. Once depression alleviates, you start thinking more clearly (make less cognitive distortions in your thinking) which further leads to a 'normal' mental state of well-being (in an otherwise mentally healthy individual).