@anamur-- Anti-parasitic medication works best for guinea pig mites. You don't have to go to the vet to get ivermectin. Vets usually give ivermectin shots which are expensive and also very painful for the animal.
You can get 1% topical ivermectin for small animals over the counter. To use it, you need to weigh your guinea pig and then use the dose chart to determine the dose. Measure the dose of ivermectin with a syringe and then apply that amount topically right behind the guinea pig's ears.
This is an easy and safe treatment for mites. I've used this method several times and it worked like a charm. At one point, I had eight guinea pigs and one of them gave all the rest mites. I couldn't afford to have them all treated by a vet, so I treated them myself with topical ivermectin. Just make sure to clean the cage and bedding frequently to prevent another infection after you do this.