If someone tells you they're suffering from depression and you'd like to make them feel better, choose *any* topic other than their work or hobby accomplishments. They're probably finding it really hard to work on those, so you're pointing out that their merits as a human being center on a current failing.
Even if it's someone you only know through their work, there's plenty of encouragement and warmth to be shared by complimenting their past conduct, openness or kindness.