I've approached a point in my story wherein one of my characters has just been broken out of a short stretch in prison (around a week).
Seconds before being captured, he watched a good friend of his get killed, and spends a significant amount of the week grieving his loss.
Whilst incarcerated, he was beaten, threatened with torture, and shown that he is not nearly as clever as he thinks he has been.
As an originally arrogant and self-assured character, he has been sufficiently broken down that he is suffering emotionally (not entirely broken down, he is still mostly the same, but he has come to doubt himself and his abilities). At this point the villain of the story, who he had never met before, speaks to him to offer him a job.
The villain presents himself as a reasonable person, and explains to him that their ultimate goals align. He sets out his particular view points and asks the character to think about joining him.
After this exchange he is later broken out by his friends, and they proceed on with their original journey. He begins to feel different however, and is beginning to doubt himself and his view of the world.
This character will eventually leave his friends and their pursuit of the quest. He will originally head out on his own to rediscover himself and his priorities, but he will end up after some time allying with the villain.
My issue is that I can't figure out a way to instrument his departure. His friends understand what he has been through whilst in prison, so they would not be unreasonably antagonistic towards him in order to make him leave them so abruptly.
I don't want him to immediately believe the villain is right and go and ally with him, I just want him to come to the conclusion that his friends might be wrong, and refuses to follow them anymore.
How can I realistically create a reason for this character to eventually snap, abandon his friends and set out on his own?
This would preferably come about rather quickly after being busted from jail, but if that is too unreasonable and there is a way for it to be more realistic but would take longer, that's fine.