Chosen Solution

My Imac 2017 gives me an electrical ground loop shock. Im worried it might be damaged in the long run.

Yes!! You can damage your system and hurt your self! First unplug your system and any peripheral devices from the outlet. Get an outlet tester to check for faulty wiring of the outlet. Get an electrician to fix the outlet and check your breaker panel and your buildings grounding. I strongly recommend getting a good surge suppressor or better yet a UPS for your system and your peripheral devices. Test your systems case is no longer hot using a DVM meter if it is you need to get your system in for repair.