There are zero circumstances where you would not want to connect the ESD mat into the protective earth of the building, if that is available in the plugs of the same room. It is always the right thing to do, and all 3-prong appliances do that, expose this safety earth directly accessible to user's touch (not through any resistors). If you fear touching the ESD mat, then you can't use any metal cased 3-prong appliances, they are all dangerous.
1-Mohm resistor is not for safety, debugging live mains-powered things requires completely different approaches and would not recommend doing that at all. Although if everything else fails and you are doing things you definitely should not be doing, that 1Mohm resistor can then work as a final safety layer it's not intended to be. As long as you don't touch the radiator, toaster etc. which still expose that scary mains thing (protective earth), without any 1Mohm resistors.
Theory of "grounding" is simple in this case: the protective earth happens to be the connection which carries most parasitic paths to all sorts of building materials around the house. Thus by connecting to it, you have best chances of equaling charges and prevent ESD zaps.