Hello Mr. Rizvi,
Thanks for writing in.
It seems that you are allergic to some ingredient in pepsi or coke and I am afraid the only way to prevent this is to stay away from it. You can consider a regimen of oral steroids
in consultation with your physician but the only way to prevent it is to stay away from it.
Staying away from this along with a course of oral steroids can help you regain your hair. Please consult an allergist or an internal medicine specialist for this.
hope this helps