Alright, so Tolstoy really wasn't playing around with that ending. Anna's final arc is brutal. After that disastrous encounter at the train station where Vronsky seems cold and distant, her paranoia and jealousy completely consume her. She's convinced he's going to abandon her for a society marriage or is already seeing other women. In a state of utter despair, she goes to the same train station where they first met, throws herself under a freight train, and dies instantly. It's one of the most famously bleak climaxes in literature.
Vronsky is shattered by guilt and joins a volunteer regiment to go fight in the Serbian-Turkish war, essentially seeking a noble way to die himself. He's a hollow shell of his former self. Meanwhile, Levin and Kitty's storyline provides the contrasting 'happy' ending—after struggling with faith and the meaning of life, Levin finds a form of peaceful, grounded purpose in his family, his work on the estate, and a personal, quiet belief in God. Karenin raises Anna and Vronsky's daughter, Annie, becoming a more somber but dedicated figure. The book doesn't wrap things up with a neat bow; it leaves you with Levin's uneasy but hopeful stare at the stars, wondering about it all.