I have shot both extensively. Initially I was very close to getting the PX4. I shot it quite well but I then shot the M&P9. My grouping were far better, I also prefer the grip, and the lower axis. The M&P is not perfect..I have had issues with mine a few times (dead trigger...I have an older M&P) but smith has been there to fit it without any question. As for the PX4, I noticed one thing I did not like about it, the recoil spring rides on a plastic rod, M&P is on a steel one. It has been over 2 years since I looked at the px4 and the one I shot is my best friends so beretta might not still have this design. He purchased his px4 when I purchased my M&P. It is a cool looking gun. Other than the spring I think it is built pretty well. I personally would not own one but that is because I shoot other guns now better than the PX4. I believe it is a good gun but know this...beretta support is god awful!!!! Be warned! Now S&W support....awesome! I have dealt with both (I have a beretta shotgun as well). But in all honesty shoot them both...see which one you like, from how it fits your hand to how well you shoot it. My buddy shoots his quite well.
Someone mentioned the pistol-training.com test of the P30 and the M&P. For starters the P30 is 2x the cost. Is it a great gun...absolutely...I love the grip, extended slide release, mag release and even the trigger. However I dont shoot it as well as the M&P...not just because I own the M&P but comparing both initial tests (I keep my targets when I go to the range and test a new pistol...well I did) I shoot the M&P significantly better which is too bad for I love the build, feel, ergonomics, and so on of the P30 better. But lets get back to the reference someone made and put the P30 and the M&P into context. Lets compare round counts equally from pistol-training.com test of both....most of us will never come remotely close to shooting these round counts.
M&P had 62,333 rounds before S&W called the test. At that point it had a cracked slide but was still working. It was not in an unsafe location either. At that round count the M&P had 2 Stops and 2 broken parts...I believe including the slide. Not bad! In comparison the HK at nearly the same round count had 9 stops and 3 broken parts. Just something to think about. 9 is a lot higher number than 2! At 2x the cost...I was expecting more. At any case S&W would fit this slide for free! Overall the M&P did pretty good in their test. 62k rounds is a lot. I will never get close...not to mention the range fees and ammo cost would kill me!
My advice is try a number of guns. Dont buy anything anyone tells you to buy...buy what you shoot well. I did (this will be long for I take notes about what I shoot this is my brief findings for myself it helped me pick the M&P at the time). I started off by wanting an XDm so I shot it first which when I went in I was dead set on buying it but did not shoot it well after 200 rounds spent I passed on it. 92FS just flat our shot it terrible. PX4, shot it decent but not the best. Sig P250, shot it quite well but didnt like the overall feel...it was not as nice as other sigs. P226...Shot it terrible. SW99 shot it extremely well but the demo gun was absolutely beat to CRAP and I wasnt a walther fan at the time...more on that. P30 flat out shot it terrible! and this is sad because I love the feel, ergs, and everything else about it...quality fit and finish, the list goes on. 24/7 G2...wow did I hate the feel more than any gun I have ever shot...not to mention shot it like CRAP. PPQ, remember the P99...the PPQ is based on this but with a number of improvements. I became an instant walther fan after shooting this gun...I love it! It is on my list to buy...this will replace my M&P!!! Excellent trigger, extended slide release, love the mag release better than the p30, grip, build quality, and price 500!!. Baby Eagle, this is the gun I shoot the most accurately. I am lights out with it! Under 2" groups at 50'...this is very good for me! It is heavy but I cannot deny how I shoot it! I have shot it a few different times..just like the other guns I have mentioned. It is also on the list!. G17...I wanted to be a glock fan the story of this gun and its reliability is remarkable! But I never liked the grip nor the angle, either you like glock or you dont..I wanted to but didnt shoot it well at all..does not suit me. And finally the CZ-75b, it has a very narrow slide to grab onto, heavy, trigger is different for me, and I just didnt shoot it as well as I was expecting. All of these guns I have given ample time and shot at different times. Most friends guns and other at a number of factory shoots. I shot the M&P 2x with over 300 rounds to make sure it was the one for me. It was a rental gun and beat but performed to my liking so I bought one.
My lengthy point here is try before you buy anything. I was dead set on the XDm and if I had bought it I would have been disappointed! I do however shoot it still quite a bit for one of my closest friend has one and we shoot on a very regular basis. I grab it thinking this time will be different and sometimes I shoot it good but most I do not and nowhere near the level of me and my M&P well the rental M&P...mine has given me so issues however smith and their excellent support are going to take care of it...but this is another story. Also remember, what I like and shoot well might not be the same for you. Dont let anyone push a gun on you! I am a fan boy of no gun however there are guns I like to shoot and there are gun I shoot well!! I buy a gun that I shoot well...I dont collect I shoot so I want something I shoot well and dont get frustrated with. Just my 2 cents...sorry for the long post but I do hope it helps.