First of all, no commonly available firearm will negate the risk of overpenetration. The interior walls of most modern homes and apartments are little more than pine 2x4's spaced about a foot apart and covered over with drywall. Nearly any common firearm, including a .22LR can easily penetrate two sheets of drywall.
As far as the terminal ballistics of a .22 are concerned, why not simply look at how they perform in ballistic gelatin?
http://www.brassfetcher.com/var22lrrifle.html
Now, what do we want in a self-defense bullet? Most people prefer a bullet that will expand as much as possible while still penetrating somewhere between 12" and 16" in order to ensure that it can reach the vitals of a very large attacker or one shot at an oblique angle. In the brassfetcher link, only three .22 Long Rifle loadings meet this criteria: the CCI Velocitor (13.3" penetration and .335" expansion), the Federal 36gr JHP (14.3" penetration and .308" expansion), and the Remington Golden Bullet JHP (11.9" penetration and .340" expansion). Between these three, my choice would be the CCI Velocitor as it seems to deliver the best balance of penetration and expansion.
So, how do the Velocitors stack up against other common firearms? Again looking at brassfetcher, we see that a Fiocchi .32 Auto 73gr FMJ fired from a Kel-Tec P32 penetrates slightly more than the CCI Velocitor at 13.8" but does not expand so final diameter would be approximately .311".
http://www.brassfetcher.com/Various%20.32ACP%20%28Kel-Tec%20P32%29.html
A .380 Auto 95gr FMJ, when fired from a Kel-Tec P3AT penetrates in excess of 16" but does not expand so final diameter would be approximately .355". Also, the .380 FMJ may yaw somewhat depending on the shape of the bullet (TC vs. RN).
Unless very specific organs are hit, the moderate amount of energy produced by these cartridges will have minimal, if any, effect on terminal performance. Even so, energies can be fairly easily compared. CCI advertises the Velocitor as a 40gr bullet at 1435fps for 183 ft lbs energy, Federal advertises their .380 FMJ loading as a 95gr bullet at 980fps for 203 ft lbs energy, and Fiocchi advertises their .32 Auto FMJ as a 73gr bullet at 980fps for 155 ft lbs energy.
Therefore, in just about every measurable way, the best .22 LR loading available, from a rifle, gives us performance in between that of a .32 Auto FMJ and .380 Auto FMJ.
Ballistics aside, there are other factors which must be considered as well. On the plus side, a .22 rifle is one of the very easiest firearms to shoot because both recoil and report are very mild. Also .22 Long Rifle ammunition is the least expensive available which makes high-volume practice quite affordable. Finally, quality .22 rifles are less expensive, by and large, than comparable firearms in other calibers.
The downside to a .22, besides ballistics, is reliability. The relatively long, skinny rimmed cartridge is one of the most problematic when it comes to feed reliability in a repeating firearm. The outside-lubricated heel-based bullet also presents problems in and of itself. Because the bullet lube is on the exterior of the cartridge, dirt is more attracted and the lube itself will more quickly foul the gun. Also, heel-based bullets do not seal the powder and primer from contaminants such as oil and moisture as well as inside-lubricated bullets do. Rimfire primers are more susceptible to misfire due to quality-control issues (the centrifuge that spreads the priming compound must be run for a certain amount of time to spread it evenly) than centerfire primers and, because .22LR ammo is usually marketed for non-critical applications such as plinking, target-shooting, and small game/pest control, QC issues seem to be more common.
IMHO, a .22 rifle isn't the worst possible choice as I think it would be preferable to a .22 or .25 Handgun. However, unless a more powerful centerfire gun simply is not a viable option due to recoil sensitivity or finances, I think that something more powerful and more reliable such as a pistol-caliber carbine or .410-20 gauge shotgun would be a better choice.