Thought here... Maybe it isn't Glenn's "hallucination" but Nick's..
He's been the one flipping out throughout the run through town looking for a building to burn.. and Glenn constantly pulling him back to reality..
So they get on top of the dumpster, both empty their pistol's and he goes into the

look thinking they are done..
Hallucinates that he miraculously finds one extra bullet... realizes that if he shoots himself he also kills Glenn who he owes... snaps too and they climb the fence and use it to get to the building..