The shop, in the Victoria Place shopping centre, was evacuated and closed, and the Kent air ambulance was called.
Victim Philip Dodd,62, was declared dead at the scene.
It is understood that he was a contractor rather than a Marks and Spencer employee.
An M&S spokesman said: “There has been a tragic incident at the store today and our thoughts are with the family concerned.
“We are now concentrating on doing all we can to assist the emergency services with their investigation and as such are unable to comment any further at this stage.”
A Kent Police spokesman said: “Police were called just before 3.30pm. It is believed the man suffered an electric shock. The air ambulance was called but he was declared dead at the scene.
“The incident is likely to be handed over to the Health and Safety Executive.”