What happens after you shoot him? Is my gun empty? Why not?
Ok, the old joke: Two guys are hunting and the one gets bit by a snake. He's in cell phone range, so he calls 911. The operator asks if his friend is dead. After a few seconds the operator hears a gun shot. The caller gets back on the phone and says "he is now."
So what do you do after you shoot the home intruder. First, you make sure he no longer presents a threat to you or your family. Then, not taking your eyes or gun off him, you call 911. Then you call your attorney. Or a friend who is one, or someone who knows a good attorney. When the police arrive, you need to be not holding a gun or they may shoot you (or mistake you for the family pet and shoot you.) There's going to be a nervous moment. The ambulance will be there shortly if you've not done a good job of shooting the intruder. If you did your part, the coroner will be along shortly.
If you live in a gun friendly place, or know the police, chances are you won't be hauled off to jail. But its not unheard of. Common sense says you should say nothing. It can't then be used against you. But reality takes hold and you will need to identify yourself as the homeowner, and that you have no idea who the jerk is on your living room floor. But he's not an invited guest. With luck, there's ample evidence of his forced entry, like a big footprint on your door and a shattered door jam.
Then get ready for the worst day or two of your life. Make a doctors appointment for as soon as you can. At least get something to help you sleep. Call the carpet folks because the jerk either bled out and ruined it, or the police took a big ugly sample of it. If he failed to die quickly enough and kept suffering (good), he probably bled out or nearly so. Doesn't matter, you can paint the average size house with a few pints. You may even need to hire a biohazard firm to clean up the mess.
And call into work sick. You probably won't be able to do much anyhow. Plan on meeting with the attorney and giving multiple statements to the police, prosecutor, and various investigators. Forget the media, they're not your friend. They always get it wrong anyhow.