Between 9mm and 40SW, I prefer 40SW for a few reasons, none of which necessarily good reasons or ones that would make sense or be important to you. Now, from a ballistics and numbers perspective, it seems one generally has to go to +P pressures to be very close to 40, and as a handloader I'd just prefer not to do that. If I didn't handload and had to buy ammo, I'd also prefer to try to find 40SW ammo of any kind than 9mm +P, but of course no one said +P is a requirement or anything. I simply would like to get the most I can from these little cartridges, and 40SW is as small as I'm willing to go. I actually carry 40SW rarely these days, and much prefer 10mm--with no sacrifice in capacity.
Also as a handloader, I like 40 because of the great variety of bullets that I can select from, AND that I can also load in 10mm Auto, which is a favorite of mine. 40SW and 10mm 'go together' for me at the loading bench, and I enjoy loading them both. I don't have any interest in loading 9mm, and I have no interest in shooting anything I can handload. As I mentioned, these are my preferences--nothing more. I'm happier with 40SW, and don't care much for 9mm--that's about it.
As for the M&P, I have two of them...on in 40SW and one in 45ACP. I love them both, and I think you'd be very wise to get hold of an M&P (in any caliber) to at least hold, if not shoot. Many shooters, myself included, find them incredibly comfortable and extremely easy to shoot. My current plan is to buy two M&P 40c compacts for my daughters, and I'll do that as soon as things come just right.
You didn't actually say what you wanted the gun for, but it looks like everyone assumed you wanted it for personal defense--based on my experience my No 1 recommendation would the M&P 40c (or 9c if you prefer to go 9mm)...that's why I'm comfortable arming my two daughters (who are fairly new shooters) with that gun. My M&P 45c is about the pleasurable and accurate handgun I own, but I'd prefer the capacity/size of the 40 cal gun over the 45 for them. The additional capacity or smaller size often afforded by 9mm isn't of enough importance to me, though, to warrant going to a cartridge I just "don't like". Again, preference here, not analysis.
My every-day carry is the Glock 29 in 10mm, but I think that would be a silly recommendation for a new shooter (who should be shooting a lot) and a shooter who doesn't handload (the ammo is expensive, pretty much only available mail order, or is loaded so as to have little advantage over 40SW).
It makes no difference to me what the FBI or the military shoots--and I don't think they generally base their selections on a whole lot that I care about--being mostly contractual considerations AFAIK.