The treatment for skin infections is antibacterial, antifungal, or antiviral medications. In rare instances of viral infection, a person may need to go to the hospital. Therefore, a person should not try to treat infected eczema at home.