The laws vary from place to place, some places look at it such that you are not in danger until the bad guy comes through the door, others recognize that you are at risk when they try to come through the door. Others even allow you to defend yourself before the bad guys reach the door, if you feel you are at risk.
If you don't know, perhaps you ought to wait till they break in and set foot inside...hoping that isn't too late, of course. Shooting through the door? I wouldn't, but then I'm not 82 yet, either. Besides, I don't want steel sheathed wood to slow down my rounds before they hit!
Here's a fine example of a question for everyone who worries and argues about "overpenetration" of their defensive ammo! What if you HAVE to shoot through a door, and you have chosen a round with the least "risk of overpenetration"? Aren't you putting yourself at greater risk by doing that? Is the risk of the round failing to penetrate the bad guy worse than the risk of what it might hit after it exits? Can of worms there, I'm thinking....
Yes, the old advice to "make sure they fall inside the house" (meaning drag them in if necessary) is today, BAD ADVICE. A century ago, even a half century ago, when the local cops would just look at the scene (assuming there was no obvious evidence like a blood trail or easily visible drag marks) and decide if it was a good shoot or not, are long behind us.
Dead men do tell tales today. But they seldom lie. Doing anything that could be considered tampering with the scene is "lying" to the cops, and implies that you were NOT certain you were justified in shooting.
I can imagine some very, very limited situations where that might be a justifiable thing (such as, its winter, you wound the guy, he's no longer a threat, and you drag him inside so he won't freeze to death before the ambulance gets there, but he expires anyway....) something like that may be excused, but under more ordinary circumstances, if you do ANYTHING once the threat is over, its not going to be looked on favorably. Don't drag them inside, don't move them, or any physical evidence beyond what is needed for your own safety (like kicking his gun out of his reach).
I would also council against having a drink to "calm your nerves" while waiting for the cops to show up. Really BAD idea. Don't do it.