Only you can make the call really. If the higher capacity and extras of the M are important to you, go for it.
I sold my XD40 Service a couple months ago to fund my Sig. Sold the full assortment of gun, XD Gear/Crap, total of 6 mags for $425. I probably could have gotten more, but it was a good friend that wanted it so I took that deal and I ate the shipping and FFL fee on my end as well. I also sold my XD9SC for $425 plus shipping (still paid the FFL fee on my end). So you shouldn't lose too much on the XD40 is you choose to sell it.