You're right, by swapping work for exercise, I did work less (and exercised more).
But before I started eating and sleeping better, or exercising, I did try and remedy the negative feelings by just taking time off work (e.g. whole days off, going for walks, etc), but I did that without changing my bad diet or eating habits, and without doing any exercise. It didn't work for me. The depression and anxiety was still there.
The change came only after I improved my diet, exercise and sleep.
Of course, this isn't a scientific article about mental health :). Just what I experienced.