I had a similar experience to Ymir, actually.
My best friend of eight years had a pronounced depression for most of the friendship. There were times when I felt closer to him than I ever had to anyone. We shared very similar interests, in addition to sharing an outsider's perspective on life. We would have long talks about life and human nature, share recollections of our unhappy childhoods and the contradictions of dealing with other people in our lives. It was wonderful to feel so tuned into another person. Then there were the other times when he would get very abstract and melancholic; he'd make comments to me that would cut right to the bone, belittle my every achievement, judge me for the smallest mistakes I made, get intensely jealous of the smallest sign of being better at socialising than him. These times were not so wonderful.
About six and a half years in, he started to dig himself out of his depression. That was when things really started to fall apart for us. There was a shift in our friendship (Ymir put it very eloquently, he "changed his mind about me"). Gradually, it went from being fairly reciprocal in communicating and making plans, to me doing most of the heavy lifting. Sometimes I wouldn't get a reply to a simple "how are you?" text for several days, even weeks. When I did see him, he was like a stone carving. He would show very little emotion, resist every attempt I made at conversation, let long, tense silences creep in, constantly make little comments and barbs at my expense. I found this behaviour much more taxing than his depressive mood swings ever were. It began to affect me mentally and physically after a while: I would get low-grade panic attacks and hives as I would go to meet him, eventually even when I had to speak to him over the phone.
Anyway, after maybe nine months of living with this stress, I couldn't take it anymore. So, rather than have a pointless (from my perspective) confrontation with him, I decided I would end things as gently as possible. I booked two tickets to a theatrical adaptation of a favourite book of his, went out and bought a nice edition of that book, wrote a short letter telling him that I couldn't be friends with someone who seemed to have such low regard for me and that I was grateful for his friendship over the years, put it in the book and wrapped it. We had a nice night at the theatre, I walked him to the train station and gave him the book just before we said goodnight. That was eighteen months ago, I haven't had a single panic attack or hive since.
I'm much more careful now about the time and effort I invest in other people. I keep my innermost thoughts and feelings to myself. I'm more guarded and less inclined to give anything away, especially trust. It's quite unbelievable how much one person can damage your self-esteem. And not in one clean blow either, but in a long, slow process of making tiny chips in your emotional armour, until finally there are enough cracks that the whole thing falls away and you're left defenceless to their attacks.
So that's my experience of living with a depressed person other than myself. The most relevant lesson that I took from the whole experience with my former best friend was that just because an individual is depressed, don't assume there's always a nice human being underneath it all, struggling to get out. Sometimes we make our own solitudes.