It is allowed to use a handkerchief while praying in order to remove sweat, but one should do this as little as possible.
In his response to this, Sheikh Ahmad Kutty said:
If you are sweating while in Prayer and it is bothering you, you are allowed to carry a handkerchief and use it. However, since we are to abstain from all extraneous activities during Prayer, you should use it sparingly. In this way, you would not be invalidating your Prayer. You need not be overly anxious about this condition.
Having said this, I must advise you to consult your family physician in order to seek treatment. Also, never fail to pray to Almighty Allah to cure you of this condition.