Even when it wasn't that dark, the books continuously dealt with the theme "Life may suck but you need to deal with it." Just like in real life, there are plenty of times when the heaviness of life is lifted and things are simply fun and crazy, but the overarching struggles of life always return to haunt the characters. Each of the Animorphs' coping mechanisms were discussed and explored a great deal.
Jake was putting on a strong face, but in book 37 Rachel notices how it's breaking him. He was holding on the entire time for his family. The loss of his parents ended the brave front he'd been showing the Animorphs and sent him into depression. Cassie's decision to protect him from killing Tom convinced him to abandon morality and do whatever it takes to win. Tom and Rachel's deaths break him just as the war ends. The immediacy of the war had always stopped him from looking back and second guessing himself, but that coping mechanism fails when the conflict ends. After a few years he starts to move on, and when a new war begins he's his old self again.
Rachel generally avoids introspection and deals with what needs to be done, but it gnaws at her on the inside. She is always willing to make sacrifices to help others, to be the one to do the dirty work. She becomes scared and lost and confused when she reflects on this, because she is losing herself and she doesn't know where this path is leading her.
Tobias relied entirely on Rachel early on when he had no self esteem of his own. He would frequently talk to her to sort out his own feelings and struggles. As the war went on he grew in confidence and became more comfortable with himself, but he loved Rachel and she was always his crutch. She was the strongest link he felt he had to humanity, so when he loses her he lives only as a hawk, broken on the inside.
Cassie remained firmly grounded in her morals. They helped her maintain a sense of stability as her world changed. She had strong support from her family and Jake. When she had doubts, she would talk things over with her loved ones and find reassurance. Her coping mechanisms allowed her to emerge from the war able to continue with her life. But book 41 showed that these mechanisms weren't infallible. When Jake refused to listen to her and offer reassurance, she went home a mess. Almost immediately afterwards Jake was killed and Earth was conquered, causing Cassie to throw away everything that had kept her grounded. She becomes disgusted with what she thinks is her weakness and changes into a completely different person, a hardened terrorist.
Marco rarely relied on others for support, since he had had to take care of his family by himself for a few years. He lives by the guy code, meaning he doesn't talk about his feelings. He lapses into depression, impulsiveness, and mental instability a few times, but he believes in trying to see the world as a comedy rather than a tragedy. That gives him a flexible world view, so when things are horrible he's still able to snap out of it with a quick change of perspective. He practices shutting down emotional ambiguity and focusing on what's necessary. The end of the war leaves him with a nagging sense of emptiness, but he doesn't hesitate to live out his life.
Ax had always been extremely disciplined, and he practices daily rituals to remind himself of his people and culture and their values. He is a faithful soldier, and after the war he continues serving his people as a wise, experienced leader. He selflessly serves something that is greater than himself, so in a way his being absorbed into The One is darkly appropriate.
The long epilogue that was the last book was necessary to the story in part to show whether the Animorphs' various coping mechanisms are able to carry them through the end of the war. A happier ending that didn't present the characters with some internal challenge post-war would have abandoned this theme, which had given the story so much resonance. It was an honest ending.
The fact of Rachel's death revealed as much about her as any of the other Animorphs' post-war stories. Jake had to choose one of them to sacrifice, and Rachel had stepped up to the plate. It was the natural culmination of her story. Someone needs to be the one to do the dirty work.