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.
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.
From the outside, Neon Genesis Evangelion is about fighting aliens using mecha, but as any fan knows, its true theme is a deep dive into the characters' psyches. While no one is officially diagnosed with any kind of mental illness, Shinji Ikari, in particular, seems to have some issues. He regards most areas of life with neutrality or misery and sees himself as worthless. He doesn't want to get close to other people because he's afraid of getting hurt, but remains desperately lonely and wishes he could reach out - but his attempts to protect himself lead others to reject him.
Shinji's struggle to connect with others is at the heart of this classic anime, but he isn't the only character to struggle with mental illness. Asuka's mother took her own life after struggling with mental health. Processing her mother's untimely demise caused Asuka to harden her heart, become aggressive, and reject the possibility of forging meaningful connections with others.
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.