I think Jim/Gabriel after losing his memory is, in a way, a reflection of what happens to us, humans, throughout our lives.
Since angels and demons are generally used to portray and satirize human flaws on the level of the overall system (they also reflect the religious satire of the story, but I also see them as a reflection of human flaws, pointless wars, cruelty, and so on), and since both the book and the show make it clear that both angels and demons can be either cruel bastards or fairly ordinary, decent beings who are simply doing their jobs without taking any particular pleasure in hurting anyone (just like humans), I would argue that after losing their memories, angels and demons regress to roughly the level of a five- or six-year-old child.
When we are born, we are like a blank slate. As a child grows up, they are shaped by their environment, the people around them, their social position, the values instilled in them, and the knowledge they acquire through learning. But if all of that were erased from our memory, we would regress to a stage before we had acquired all that knowledge, before those beliefs and ideas had become part of who we are.
When Jim/Gabriel lost six thousand years of memories, he regressed to a time before the rotten system he lived in, and in which he held such a high position, had become part of him, before concepts like duty, the Great Plan, and so on had defined his worldview. Put simply, he went from being a fifty-year-old commander with a terrible personality whose entire life revolved around defeating the enemy, serving his homeland, and serving a Higher Purpose, to being a six-year-old boy who has no idea how to hold a weapon properly, or even what a weapon is.
One of the themes of Good Omens is that who we are born as does not define who we become. Our environment, the people around us, and the way we are raised all play an important role. It's the same with the Antichrist. If the real Antichrist had grown up in a wealthy and influential but cold and emotionally distant family, without true friends and without understanding love or care, he might actually have agreed to destroy the Earth, because he would have seen no value in a world where, in his eyes, people only hurt each other, are incapable of love, think only about money, and seek nothing but personal gain. (Heaven.)
But because the real Antichrist grew up in an ordinary but loving and close-knit family, had genuine loyal friends, had a home he wanted to come back to, and parents who weren't perfect but loved him, he knew what love and care were. He knew what it meant to have someone who would look after you, and someone you could look after in return, someone who genuinely cared about you and your well-being. That is why he refused to destroy the Earth. Because from childhood, he had known that even if the world can sometimes seem cruel, it is still worth fighting for until the very end.
Gabriel spent thousands of years existing within a system where no one close to him understood concepts such as love, care, compassion, and so on. He had no real friends (which Aziraphale himself points out), no one he could trust, no one he could truly call close. No one ever taught him the things that Adam learned. That doesn't excuse his actions, but it does explain them.
Once he lost his memory, however, his mind works in a very simple way, forming what seem to him to be logical connections from the most basic concepts available to him:
«"You're funny. I love you."»
That's exactly the sort of thing a child would say to a funny adult they enjoy spending time with.
He also has trouble concentrating.
He shelves books according to the first letter of the first sentence because, from his point of view, that makes perfect sense, and he has no idea what an author is.
Like a child, he explores the world around him in ways that adults find strange, for example, when he tries to understand why things fall.
Throughout the time he spends with Aziraphale and Crowley while suffering from amnesia, he learns what it feels like to be cared for and to have someone give you a roof over your head. He learns what friendship is and what love is. He calls Aziraphale and Crowley his friends.
He appreciates Aziraphale's kindness toward him and tries to be useful in return, helping around the bookshop as best he can. Aziraphale never even asked him to do that, Jim started trying to help of his own accord, in whatever way he could.
He even acts silly sometimes
When he learns that, before losing his memory, he treated Aziraphale terribly, the very person who protected him, helped him, cared for him, gave him a name, and gave him a place to stay, he feels overwhelming guilt, even though he doesn't actually remember any of the things Crowley tells him about. He doesn't want to cause Mr. Fell any more trouble, so he is literally willing to jump out of the window if it means Aziraphale will no longer have to put himself at risk because of him. (Which ultimately becomes the moment Crowley realizes that the person standing in front of him is not the cruel Gabriel anymore, but simply Jim, who genuinely wants to help.)
Besides, Aziraphale had already told him that he used to be awful (s2 ep2) and after Crowley's explanation, I think the pieces finally fell into place for Jim.
Then, during the ball, when Mr. Fell is in danger and Jim realizes that these strange people have come for him, and that if he steps forward to face that danger himself, Aziraphale will be spared, he decides to do exactly that without hesitation, simply to repay Aziraphale for the kindness he showed him. To repay someone whom Gabriel had treated horribly and had even wanted to kill, even if Jim himself remembers none of it, and Aziraphale still treated him with kindness. (Even though he did test him with hot chocolate and other things, things the real Gabriel wouldn't have liked if he had actually been pretending to have amnesia, so no, Aziraphale is not a naive fool.)
I'd also like to point out that, even before losing his memory, thanks to Beelzeebub, he experienced for the first time what it was like to be understood and have someone genuinely try to care for him. He even himself tried to care for Beelzeebub with that jukebox miracle.
I hope I've managed to express my thoughts clearly. I think Gabriel's redemption arc works really well from this perspective and reflects one of Good Omens' central themes. I also really appreciate that the second season doesn't forget the terrible things he did or try to completely whitewash him, which is something that often happens in redemption arcs like this.