The 18-year-old German-Iranian gunman, who used the gaming handle "Hate," had previously been in psychiatric care.