A depressed colleague
We've discussed some aspects of depression at work in another part of this web site. You might like to have a look at that before going on here.
You can be sure of one thing. When depression strikes a colleague, you will be affected. How much depends on both your work and social relationships with the depressed person.
If that person is your boss, or in the management line above you, life at work might become unpleasant. Decisions you need aren't made. You are likely to lack leadership. Such things can affect your performance.
If the depressed person is part of your work group, the effects will probably be more immediate. When one member of the team is depressed, an extra burden falls on the other members. The performance of the team may suffer even with extra effort on the part of other members.
The best interests of everyone are served by helping the person get treatment.