The world can feel like a bleak place, and sometimes viewers want anime that reflects how they feel, even if those feelings aren't exactly fun. Pessimistic anime characters see the negatives in everything, and they expect their lives to end in failure. Some power through anyway, trying their best despite their grim outlook, while others give up, or avoid situations that they think are doomed. Just because characters exist in an animated world doesn't mean that their lives are all sunshine and rainbows.
My Teen Romantic Comedy SNAFU is surprisingly depressing for a show that resembles a romcom, and that's largely because of its pessimistic main character, Hachiman Hikigaya. Hikigaya wholeheartedly believes that he will never form a meaningful connection to another person, and he purposefully sabotages budding friendships to protect himself.
He cares deeply about helping others, but his preferred method involves manipulating situations so that he is the only person who gets hurt. When he's told that others don't want to see him sacrifice himself, he has trouble understanding why anyone would care about his well-being.
Naruto features Omoi, a character whose name (which can mean both "heavy" and "thought") matches his mental state perfectly. Omoi has a gift for envisioning catastrophic projections of the future, to the point that he could probably think of a million different ways for putting mayonnaise on his fries to end in tragedy.
Luckily, Omoi can put aside his pessimism and anxiety when it's time to actually fight enemies.
Tomoko Kuroki, the protagonist of No Matter How I Look At It, It's You Guys' Fault I'm Unpopular! is a deeply pessimistic person with an odd streak of optimism. Tomoko wants to be popular, and she'll do anything to achieve her goals. However, she's so certain that any social interaction will end in failure that she's terrified to talk to anyone.
When she does muster up the courage to engage with others, she usually just weirds people out by doing things like not bathing for weeks because she heard oily hair is sexy.
There's a reason why Shinji Ikari of Neon Genesis Evangelion doesn't want to get in the robot: he's hella pessimistic. Of course he's not going to get in the robot, he thinks that the robot is going to explode and everyone is going to die. While most real 14-year-olds aren't emotionally or physically equipped to pilot a mecha and fight aliens, it would be nice if Shinji could rise up and accept the fact that he's supposed to be a shonen hero.