I personally don't like to give S&W any money or support due to thier politics in the past. I know, I know, thats the OLD S&W but I just cant do it.
That being said I have heard and read alot of good reviews on the M&P's but I personally have never fired one. I have heard and read three times as many good reviews on the XD's, I have one and have no complaints. First time I fired it I was doing as well as with my 1911 i've been shooting for years. So my vote is XD. If you look at the new XD-M it has the interchangable grip size, Match barrel, and alot more new features. Also comes with a starter holster and mag carrier.
I would go for the .40 cal. Its a good comprimise. I think there is less recoil then a 9mm, But some added take down power.
Just my opinions of course