You may be right. I would add that it need not simply be a mental issue, it could be an emotional one - increasing and severe disappointment that adult life is not all it was promised to be. Perhaps his job is mundane and he has to do meaningless tasks and sometimes answer to someone dumber or less sophisticated than he believed himself to be. His "gifts" seem unacknowledged and unrecognized. His body suffers injuries that he doesn't bounce back from, even after surgery. He doesn't get the girls he believes himself worthy of. His friends seem to be marrying off, starting families, and buying first homes and he doesn't even have a girlfriend.
If, before he launched into life, he was protected from disappointments - lessons that life presents challenges that one has to work and develop imagination to overcome and they often pick us rather than us picking them, sometimes life isn't fair, he isn't the "genius-prince the world is waiting for" but is instead just one more human being trying to make a go of it, there will always be greater and lesser persons than himself, failure is a teacher - and the resilience and perspective that one develops from encountering these disappointments and their lessons in humility throughout childhood and early adulthood, then when faced with such in rapid succession, each feels enormous and soul crushing. And combined, they feel like a massive betrayal.
Not offering excuses. He chose evil. And that is no one's fault but his own.