My G23 Gen 3 with Grip Force beavertail adapter.I fought this same battle awhile back and in the end the M&P won. Like others have said, you aren't going to really go wrong with either since both represent a quality piece that will give you lifetime's worth of service.
Aftermarket parts, holsters and extra magazines are going to be more plentiful for the Glock, but the M&P isn't that far behind. All good holster manufacturers have models exclusively for the M&P and many shops on the internet have great prices for extra M&P magazines.
The feature that drove me to go for the Smith's in both 9mm and .45 was the beavertail on the frame. My .45 caliber Glock, the model 21, fit me perfectly but the thinner framed models like the 17/19 and 22/23 wouldn't have enough grip to prevent the webbing of my hand from riding up behind the back of the slide and constantly getting cut during recoil. The tang on the M&P gives me the amount of area to get a very high and very aggressive grip on the gun; all the other features were just icing on the cake.
Shoot both and choose the one you feel like you'd want most to practice and shoot with and that is the correct one to have. Good luck and post up a pic and range report when you finally decide!