Seems to me a hand gun being smaller and more maneuverable would be a better weapon for self defense.
The only thing a handgun has going for it over a long gun is that it's small and easy to carry. It's the weapon you are more likely to be carrying and what you use to fight your way to a shotgun or rifle if one is available. Nobody would choose a handgun over a long gun if they knew they were going to be in a fight and had a long gun available.
I carry a 9mm pistol when I go out armed. It's small, light and easy to conceal. I leave it on my night stand when I go to bed, and it is probably the first thing I would pick up if the SHTF while I was sleeping. But I have a shotgun staged in my bedroom loaded with OO buckshot that I would grab as soon as I could should I need to defend my home. (Luckily, I live in a pretty quiet, rural town, so both guns mostly gather dust unless I break them out for a little range time.)
I don't own an AR or any other kind of rifle that would be appropriate in a gun fight (hold on Mr. Criminal while I load up my .50 caliber Hawken muzzleloader, lol!) but having 30 rounds in a caliber far more powerful than 9mm and the quick reloads would make it a far better choice for defending yourself with if the worst happened. Plus rifles are easier to shoot well, and shot placement is the most important aspect of defensive gun work.
Cops carry their duty pistols and usually a smaller backup pistol on them because it's convenient and they rarely have to use them. If they think they might at all get into a gunfight they usually break out a long gun. Most soldiers are never even issued a pistol because a rifle is such a superior choice.