One of the great things about anime is that it's a medium capable of taking on any topic, even the most complex. This includes mental health issues, something that many people face, but not everyone wants to talk about, and not every piece of media is willing to grapple with.
Anime about mental health can deal with the subject in a wide variety of ways. Sometimes, a mental health issue crops up briefly, like with Death The Kid's obsession with symmetry in Soul Eater, while at other times it's a major plot point. Yuri!!! on ICE uses its protagonist's anxiety to drive the story and deepen the character. It can be addressed with humor, like in Comical Psychosomatic Medicine, a short anime themed around educating the public on psychological concepts using jokes, or it can be quite serious, as with Rei Kiriyama's struggles in March Comes in Like a Lion.
Specific mental health issues are frequently not named - perhaps to let viewers come to their own conclusions, or perhaps because mental illness is heavily stigmatized in Japan. As such, it's rare to see an anime character with a clear-cut diagnosis or one who is undergoing treatment. Still, the symptoms can be quite apparent and can play a major role in the story.
Tatsuhiro Satou is too anxious to leave his home or interact with others, he stays inside, venturing out only to grab food from the convenience store. Meanwhile, he's convinced that NHK, a national television network, is intentionally conspiring to keep young people like him addicted to anime and games. He also has hallucinations which in the original novel are caused by substance use, but in the anime don't seem to have an origin. Exactly what's going on in Satou's head is unclear - sometimes it looks like anxiety, sometimes it looks like paranoid schizophrenia, but whatever it is, he's clearly mentally ill.
Helping him is Misaki Nakahara, who claims to have a step-by-step plan for reintegrating Satou into society. As it turns out, her motives have less to do with altruism, and more to do with feeling better about her own problems. The two ultimately agree to a pact in which neither is allowed to harm themselves.
Banana Fish is a show that goes places a lot of anime won't. Not only does it depict some of the most grisly things that can happen to a person, but it also doesn't shy away from their emotional reactions - and those reactions are often just as important as the events themselves. Most characters in this show have endured some kind of trauma, but the most noteworthy one is the protagonist, 17-year-old Ash Lynx.
As a child, Ash is assaulted by his little league coach, on whom he ultimately gets his revenge. He isn't convicted of anything, but social pressures get to him, and he runs away from home at age 8. Ash finds himself involved with Papa Dino, the leader of the Corsican Mafia. Though he's groomed to take Dino's place as the head of the syndicate, he's also mistreated by various members of the group and is forced into human trafficking. As a teenager, he becomes a renowned ruffian.
These terrible experiences lead him to become almost totally numb to emotions that aren't anger - but he still exhibits an intense emotional reaction when his memories are triggered.
Kakeru Naruse is so riven with guilt over his mother’s passing that he wants to expire, too. She relied on him to help manage the symptoms of her mental illness, and while he wanted to help, he also wanted to live a normal teenage life with his friends. When he decides to prioritize hanging out with his friends over helping his mom with her issues, she offs herself. After that, he starts isolating himself and ultimately tries to put and end to his own life - in one timeline.
In another timeline, his friends succeed at sending messages back through time to their past selves, with instructions on how to help Kakeru survive to adulthood - which includes one friend, Naho, confessing his romantic feelings for him. The anime manages to showcase the healing power of friendship and love without implying that that's all a person needs to heal from mental health issues.
In Perfect Blue, director Satoshi Kon uses surrealist imagery to tell the story of Mima Kirigoe, a former J-Pop idol who is trying to reinvent herself as a more serious actress. Unfortunately, one of her fans is so obsessed with the former image that he starts stalking her and sets up a website impersonating her. As Mima's public image conflicts with her private self in increasingly aggressive ways, she loses the ability to distinguish fantasy from reality.
While she's never specifically diagnosed with anything, her issues with reality cause her just as much hardship as the stalker himself. Also, while one can't assume that aggressive behavior is due to mental illness, the stalker's failure to distinguish Mima from his image of her implies that he may be dealing with the same issue.