Try upgrading your PSU with 600w for feature upgrade, any brand will do try looking with a bronze certified. https://www.amazon.com/Corsair-Builder-Series-Watt-CX500/dp/B0092ML0MY/ref=as_li_ss_tl?tag=...-20&linkCode=ll1&tag=ttgreviews-20&linkId=04cfd4c8a47631836804822c6061ad...
Upgrading the RAM and HDD to SSD drive will make your Mac like brand new again. And cleaning also may help like deleting or transferring file to another drive. Make sure your HDD/SSD is not full this can affect your Mac performace.
Try using another EarPods, if it still happens maybe your headphone jack has a problem with it. Basically they will suggest you to replace the headphone jack