That surely depends on the specific situation. There are several techniques I use when attempting to help a depressed person, though, including:
1. Active listening. Sometimes realizing there's a "real ear" out there is enough to make a big difference. ("Active" listening means your provide a bit of feedback as the other person is talking, not enough to take over the conversation but enough to make clear you're paying attention.)
2. Distraction. Bummed out? Hey, let's go check out that full moon together; have you seen how the clouds are chasing across its face tonight?
3. Helping the depressed individual dig for the REASON behind the depression. Sometimes that isn't easy to find, but now and again it's fairly obvious--and figuring out the "why" is enough to start lifting the cloud of gloom.
4. Simple (honest) encouragement. Most of us have real talent in one area or another...but often don't see our own strong points clearly.