9mm for a few reasons...
Recoil is very manageable, especially with a full-size gun.
Ammo is significantly cheaper than .45 and .40. Meaning more practice for the same $.
You can get cheap practice rounds at Walmart but will want to buy self defense ammo online as it is way overpriced in stores. I get mine
hereSelf-defense rounds in 124gr +p or 147gr are very effective if you get the right stuff - Federal HST, Speer Gold Dot, or Winchester Ranger.
While the .40 and .45 may have slightly better terminal ballistics, shot placement is the key factor and you will be able to practice more with 9mm.
I have 'several'... 9mms and have shot most the of the other quality makes and models. Whatever you do, don't buy a gun without shooting it first. Some will fit your hand better than others. If you live in a decent-size city you should be able to find an indoor range that will rent out guns for a few bucks and give you a chance to try several. Smith and Wesson M&P, Glock Gen4s, Walther PPQ, H&K VP9, and probably some others all come with three different backstraps that are easily replaced so you can find one that fits you best.
A Smith & Wesson M&P will fit different than a Glock 17 or 19. Glocks have a different grip angle than most others as well, you may or may not prefer it.
You should also consider these two - they are actually very similar to each other and will fit and feel different that either the Smith or Glock. I shoot the Walther PPQ M2 4.2" in competition and absolutely love it and am considering buying the Q5 Match version.
Walther PPQ M2H&K VP9Of course, all of these are striker-fired polymer-framed guns. If you are considering an all-metal or DA/SA gun, then there are a few more options from Sig or CZ that I could recommend.
I'd be happy to answer any additional questions