I just rescued a guinea pig who is doing the same thing--he has tons of hair loss, dry/irritated skin, and is very itchy. Sometimes when he itches he then has a seizure.
The vet of course saw him as soon as I got him, and she explained that it's just how guinea pigs are "wired", if they are intensely itchy they will sometimes have a seizure. She told me not to worry *too* much when he does that, it's not immediately life threatening. Just let him chill out for a moment to recover. He tends to seize also after you pick him up, I think because of the stimulation on his miserable skin.
He has mites and may have ringworm or some other kind of secondary fungal infection--a culture is in progress. The vet felt he was too debilitated to treat with antifungals at this point, so we have just bathed him with a mild shampoo and then treated the mites with Revolution (repeating in two weeks). We are also focusing on his nutrition, as he has a poor appetite for a guinea pig and is probably vitamin C deficient on top of everything else. He wont eat his hay, barely touches his pellets, but will eat some fresh veggies. I've just started supplementing his diet with Oxbow's Critical Care given with an oral syringe.