Let me see if I can explain: After shooting himself, he goes back to where he wakes up at Overlook with The Wheelman looking on. After hearing the voices of Howard and the DJ, he realizes that he is in an endless loop, forced to repeat this cycle for the rest of his life. Most people think it's a bad ending, and I can see why, but I don't think it is.