Depression is neurological. When a person suffers from depression, their overall brain activity is significantly reduced, and this accounts for a lot of the symptoms which outsiders can find frustrating or confusing. So concentrating, paying attention, keeping up with a conversation, remembering to do things, etc, are suddenly completely overwhelming. It's like having the energy sucked right out of you. It's a neurological disturbance. It's essential to understand that.
There are no quick fixes. It's tempting, in this day and age, to think that somebody can take a pill and all's well again, but recovering from depression is like recovering from a really badly broken limb (as Jerod Poore points out at crazymeds). It's not like a sprain where you just need some ibuprofen and to keep the pressure off it. Your bones need to be re-set and then put in a cast for a while. You need some serious painkillers to get any sleep at all, and in the long-term you need lots of physiotherapy and follow-ups. Medication can help improve the symptoms of depression, but it's not a cure-all. For a severe or prolonged depressive illness it can take years to recover. It's okay to find this frustrating, but try not to take it out on the person who's depressed. It's not their fault.
Depression affects the way you think. Depressed thinking, by definition, is so negative that it interferes with a persons normal functioning. It happens in all sorts of situations and it becomes a downward spiral, where negative thinking causes negative behaviour. You withdraw from social situations because you think "what's the point? nobody likes me" and you stop doing things you used to love because you think "I'm crap at it anyway." None of this is rational or normal, but it's an unavoidable part of the illness.
You're not a therapist. Don't forget that you can't make it all better and you definitely can't be their therapist. The ill person has to tackle this themselves, with the help of a trained professional. You'll have a much easier time if you accept that. There are no magic words, and no advice you can give which will make it all better. Yes they may be being irrational, but it's not your job to point those things out. That stuff hurts coming from a friend in a way it doesn't coming from an impartial professional whose job it is. Literally, the most important thing for you to do is just be there. "It's okay. I'm here for you." That is honestly all it takes.
Be Supportive. So how do you support somebody who has depression? Let me show you something I wrote a few months ago when I was really low:
It's just so hard, because I look normal, so people forget that I have a disability. I wish just one person would not forget, and ask me how I am every now and then, or notice that I've not left my room for days. I really want somebody I can call to talk to when I feel low. Somebody who, once in a while, will just stay in wth me and watch movies. Put an arm around me and tell me it's okay.It honestly doesn't take a lot. You don't have to put your own life to one side. Just call once a week to see how they are. Just that can make a world of difference, you have no idea. How happy you can make somebody just by taking the time to check in. If things are bad, and you live close enough, set aside one night a week to see them.
Procrastination. I just want to briefly mention this because I know it's been a problem for my friends and family. Letting things build up and not dealing with them until they get overwhelming is a classic symptom of depression. Especially in people who also experience anxiety (it's very common for depression and anxiety to go together). We're not lazy, we're just overwhelmed. Don't be too hard on us.
Look After You. You want to be supportive, and for that you are awesome. Seriously. It's not easy. I have had friends who were so depressed that they were completely exhausting to be around. You don't know how to help, nothing you say is right, and you don't even recognise them. They've become selfish, negative and constantly angry or upset. It's natural to feel overwhelmed, frustrated and confused. It's important that you look after yourself too. You are allowed to have boundries, and no matter how much your friend is hurting, s/he has to respect those boundries. If you feel overwhelmed or unable to deal with their problems, you get to say so. Find a helpline or a professional they can call instead. Your support is a gift and get to say how much you can handle, and when you've had too much.
To sum up: If you're concerned about somebody and you don't know what to do, don't panic. All it takes is "are you ok? Is there anything I can do?". If somebody says they are fine and they don't want to talk, then there's nothing you can do about it. You can't help somebody if they won't help themselves. If they tell you how they really feel, just listen, even if you can't relate, it still helps. Try to see the person underneath all the sadness. They may be acting totally differently, but the person you used to know IS still there underneath all of that. You might find if you just have a chat with them, make them laugh if you can, and make them feel comforted and loved, you can make a world of difference.