I'm not so sure about the possibility of mental illness. South Carolina has a very mainstream, racist subculture. Its fairly common for people like this young man to be raised in an environment where adults openly express extreme racism and hate. If its all you've heard or known all your life, its easy for an impulsive young man with a new gun to act on that hate.
OTOH, in some ways, the endemic racism and hate is a manifestation of a type of mass societal mental illness, but not the type to be classified as organic or severe mental illness.
Sadly, South Carolina is not the only state in the south to have a mainstream racist subculture. BTW, I'm white & the hate & racism disgusts me no end!! The Civil War has been over 150 years & it's way past time for people to bury it & move forward.