This paper proposes a novel retrofittable approach for dual-functional energy-harvesting and robust vibration control by integrating the tuned mass damper (TMD) and electromagnetic shunted resonant damping. The viscous dissipative element between the TMD and primary system is replaced by an electromagnetic transducer shunted with a resonant RLC circuit. An efficient gradient based numeric method is presented for the parameter optimization in the control framework for vibration suppression and energy harvesting. A case study is performed based on the Taipei 101 TMD. It is found that by tuning the TMD resonance and circuit resonance close to that of the primary structure, the electromagnetic resonant-shunt TMD achieves the enhanced effectiveness and robustness of double-mass series TMDs, without suffering from the significantly amplified motion stroke. It is also observed that the parameters and performances optimized for vibration suppression are close to those optimized for energy harvesting, and the performance is not sensitive to the resistance of the charging circuit or electrical load.