I think there are a number of things that create this impression.
Foremost, always consider whether what you are seeing is representative. Is there anything that makes it more likely that, if an artist is depressed, you will hear about that than it would be if (1) they weren't an artist, or if (2) they weren’t depressed?
(1) is almost surely the case - most non-artistic careers, sort of by definition, are less dependent on the personality of the person doing the job than art is. This is especially the case since art has been sort of subsumed into social media. If you compare artists to, for example, somebody who spends most of their day unloading boxes of Pepsi for Wal-Mart, the latter group probably has similar or maybe higher rates of depression, but is much less likely to post a YouTube video about it, or to somehow unload that information on Wal-Mart customers.
Another element is that a lot of artists you will see online work alone, so when anything puts a stop to their work the whole thing stops, so the people who want to watch their videos just can’t, whereas if the Pepsi person is depressed people can probably still get Pepsi - so the fact that an artist is depressed is something people will care more about. This also goes for anything else that would interrupt an artist’s life. For example, I know that like three YouTubers have moved since I started watching their videos, but not even where they live, which would be completely dumb information to have about a stranger if that stranger weren’t an artist.
I’m honestly not sure about (2), since depression and the like tend to limit people’s output, so even if depressed artists are more likely to talk about their depression than non-depressed artists are to talk about their ... fine-being, maybe they are less likely to actually finish that YouTube video about depression.
Another thing I think is a big element is that people seem to like art about depression and stuff. idk
Nearly every single artist I've seen on YouTube or deviantART or Twitter has gone through/is going through depression/anxiety/some other mental illness. Why do you think this is?
"Glauben Sie nicht alles, was Sie im Internet lesen." - Karl Marx