As a general rule, anything that takes your mind off depression is good, that includes work. Motivating yourself to work can be difficult while depressed but having the right mindset can go a long way as work can prove to be the distraction you need.