Did he kill himself? (like, spoilers yeah?)
Here's a different idea.
He has difficulty speaking in public, and he starts to laugh. Yet in the comedy club, as his voice fades away to applause, we see that when he "wins" its all in his head. The nice girl up the hall for example, all in his head.
If his plan was to shoot himself with the Knock Knock joke, ....
was the moment when Murray interrupted, actually the moment when he killed himself.
Similar ideas happen in, eg The Third Policeman, a novel, when the protagonist lifts a floorboard.
From that point on, he is witty, erudite, commanding, able to bait and conquer the booing crowd and finally kill Murray.
Then he is rescued, miraculously, and held aloft, a whole city lauding him as a new hero.
Suddenly he is in a stark white hospital. Very clean, very white when we've already seen that Arkham is a dirty yellow.
And the very end into the light, despite the men in white running after him.