What is the best way to whiten my teeth if enamel eroding?

How bad is erosion? If your enamel is eroding then there probably is no best way to avoid pain and sensitivity while doing whitening.
Strengthen first. If your enamel is eroding, this is a major concern. Visit your dentist first so he can help get your enamel stronger. If your teeth are eroding, then you are highly likely to have substantial sensitivity during teeth whitening.
Several solutions. You could just bleach the teeth if whitening is your only concern however if the enamel is eroding you may want to consider veneers, to cover the eroding areas or crowns for even more strength. Consult your dentist for the best options.