As brutal as it was, Glenn's death on The Walking Dead wasn't unexpected. Many fans had been steeling themselves for his death for seasons, and not just because he seemed to have a deadly near-miss at least twice a year. Long before Season 7 premiered, most viewers knew Glenn's days were numbered, and there was a good reason for that. It has everything to do with what happened to Glenn in The Walking Dead comics. Any comics fan would have already been prepared for what went down in "The Day Will Come When You Won't Be." However, just because his death was anticipated by many viewers doesn't mean it wasn't incredibly hard to watch.
Glenn's death plays out in the show almost exactly how it does in the comics, even down to the look of his injuries. Though some things were altered to try and catch the audience off guard – like having Negan kill Abraham first, and making Glenn's death the result of Daryl acting out – the major details remained the same. In both the show and the comics, Negan brutally kills Glenn with a bat, and at the very end Glenn is left trying to say a few final words to Maggie, the woman he loved more than anything else in the world. The TV version of The Walking Dead is known for changing circumstances around and giving one character's comics death to someone else, but in Glenn's case they stayed faithful to the source material.
However, just because the end point of Glenn's story was the same, it doesn't mean the events leading up to it were. A lot of Glenn's story in both the TV show and the comics were similar: Glenn and Maggie were always in love, and Glenn was always a bright spot in TWD's dark world. In the comics, he had never even killed a living human (only zombies), something that was also true on the show up until last season's attack on the Savior compound. But there were differences in the details.
Glenn and Maggie's family had already expanded, in a way, in the comics. She was pregnant with their first child in both mediums when he died, but they had already taken responsibility for another child, Carol's daughter Sophia. Unlike in the show, in the comics Sophia is still alive (whereas Carol is dead), and she's been being raised by Maggie and Glenn. In fact, shortly before his death, Glenn had wanted to move the entire family to the Hilltop community because he considered it safer for Maggie, Sophia, and the baby. Maggie moves there after he's gone to honor his final wish, and ends up running the place.
It seems likely that Glenn's death will result in a similar trajectory for Maggie on the show. She was clearly ready to fight after he died, and she's already been shown to effectively handle negotiations in Hilltop and Alexandria. What happened to Glenn will motivate Maggie to begin the next part of her journey, though that comes at an incredible cost.