A few of my family members struggle with depression and also with anxiety. I love them dearly, but spending too much time with them can ruin my mood. It is exhausting to try to be upbeat around someone who is depressed; in my experience, they win, and I am dragged into sadness as well. Similarly, it is stressful to be around someone who suffers from anxiety.
It is widely accepted that mental illnesses like depression and anxiety are positive feedback loops. I don’t know why the same traits that make them so would not be able to impact others.