The best way to treat this is to flush out the system with chlorine, killing the bacteria. You could also heat up the water to temperatures above 140 degree F or 60 degree C, as most bacteria die at these temperatures. However, this is not as effective as using chlorine and also leaves the chances of reinfection open.
Another way to fix this is by replacing the anode. However, it rarely works and it doesn’t address the root of the problem. If you choose to chlorinate, we would suggest adding a filter to keep out the sulfides from re-entering your system. Additionally, adding a UV filter can kill the bacteria.