I own an XDm chambered in .40 caliber. I have fired both the XDm and M&P (full size and compact).
Size - The XDm Compact is smaller than the M&P.
Grip - The M&P offers a full four finger grip. While I am able to keep my pinky on my XDm grip, I would like to have about another 1/4 inch of real estate and I don't like the angled aftermarket pinky extension. Wish someone made a flat +1 magazine extension for the XDm.
Grip Safety - XDm has one, M&P doesn't, I like the safety.
Take Down - Safety and simplicity goes to the XDm. You can field strip the XDm without pulling the trigger. I like that.
Ambidextrous Operation - M&P wins this category as you can lock the slide back from either side. If your strong hand goes down in a fight and you have to lock the slide back on the XDm using just your support hand, good luck. Is this a big deal? Nope, at least not until you need to do it.
Magazines - Personal preference but I like the Springfield magazines better. They have never bound or hung up on me, very slick.
So it is going to come down to the features, benefits, and compromises you are willing to accept. All firearms require some form of compromise.