So I looked into this a bit more and the US is near the top of the world with mental illness. With that being said, as you mentioned, one of the reasons is because we are better than most places with diagnosis. It makes sense that we are going to have a higher percentage than South Sudan.
Economics plays a huge role; typically the poorer you are, the more likely. It did talk a lot about drug problems, but from what I gathered, drug addiction and mental illness are separate from one another. However, as many surely know, many who suffer from mental illness will naturally gravitate to drugs and alcohol. One thing I found pretty interesting is that women suffer much more than men when it comes to mental illness. Not just one type (say depression), but in just about every category. Why don't we see women shooting up places nearly as often? I can't recall the last time a woman involved in a mass shooting (I am sure it's happened)
The gun violence is an issue and as you mentioned, there are lots of factors: relatively easy access to guns, drugs/gangs, mental illness, lax gun enforcement, etc. All need to be addressed if the country wants to see a decrease in gun violence. I get frustrated when people will post that it is solely a mental illness issue, which is not the case. If we could magically cure mental illness, we will still have gun violence, although not as much. I also think the majority of Americans (including Dems) don't advocate for no guns whatsoever. A few on this board and others, often find that random tweet and run with it. I don't own a gun and most likely never will, but don't think guns should be completely outlawed. Found this also: a bit dated but interesting nonetheless:
https://news.gallup.com/poll/1645/guns.aspx
Here is a site I have seen before that tracks gun violence:
https://www.gunviolencearchive.org/. They define a mass shooting where 4+ people are shot iirc