That is never fun, but it is a good thing to do. Better safe than sorry. Wherever I have lived, I have always formed a tactical plan for clearing, defending, and escaping if necessary. You need to get a good idea of how and what order you are going to clear your home, and your defensive priorities (ie Kids rooms etc.) You should also have multiple scenarios in mind. If intruder is believed to be here, I do this, if here, I do that. Plan according to those priorites, layout, etc. etc. And remember, depending on the layout of your home, sometimes clearing is just not a good option unless absolutely necessary. Example, when I was staying with my folks, their lower floor was very wide open and the staircase from upstairs came down in the middle basically. The layout made going downstairs to clear very dangerous as there were just too many angles from which you were exposed. One man can't cover it all. My primary plan was to be perched upstairs which gave me about 90% coverage of the foyer, about 10% coverage of the rooms to its left and right, and anyone coming up the stairs would be walking right below and with their backs to me until the staircase turned. Overall strategy, sit tight there until police arrive, threat has subsided or if threat enters those areas, give one chance to surrender if conditions allow this with relative safety, or perforate bad guy numerous times. Field of fire was perfect also, downward angle assured no chance of stray rounds hurting innocents. And when you are clearing....
For god sakes remember to slice the pie. Slow and methodical.
BTW, don't just plan this...practice it.
Mike