Stelios
Are you getting a static discharge shock or is a continuous current flow? As many have suggested, a missing ground to the motor and therefore, metal frame of the sander may be a factor. There is a test on medical equipment that I used to do called a leakage current test. It involved opening the grounding wire and measuring the current flow to the chassis in all functions. It had to be below a certain level, depending on the type of equipment. The reason for this check was to ensure, that, should the grounding circuit become jeopardized at some point, a patient or user is not going to be subjected to current shocks such as you may be experiending. In the case of pre "double insulated" tools, (ie plastic and 2 wire power cords), where tools had metal housings, the ground integrity is paramount. It sounds like you have checked that. But, again, as someone suggested, ensure that ground integrity has not been lost between the panel and the sander. Ensure that the white and black are not mixed up in some power cord/extension cord/switch box, etc. Anyone ever change a light bulb and get a shock from touching the light bulb base? It often came down to someone repairing a lamp cord and mixing up the hot and neutral.
Please test the outlet with one of
these (or similar) to ensure the issue is not before the sander.
It could be a fault in the motor. But these type of issues would mean that with the motor running, no metal on the sander, and if you touch any metal part of the sander, you would get an electrical shock (as opposed to a static shock)
However, if it is simply a static shock you are getting, then I feel, like others, the tape on the table is the issue. In lieu of grounding yourself, can you clip onto the metal pieces with an alligator clip or metal magnet? Since this appears to be a fairly isolated issue, I would try to address the issue rather than finding a work around it like a grounding strap. I have never gotten a shock from my sander regardless of what I am sanding.
Wish I was closer. Interesting issue.
Shawn