Quote[130] Yet by a scale of comparison and by the consideration of advantages and disadvantages we must form our judgment on all these matters. For the good on certain occasions we treat as bad, and conversely the bad as good.
We have to be very careful with phrases like "pain as good". I don't know which translation you're using there, but that's not what the letter says. My own more literal translation is:
So, all pleasure, through its nature, belongs to us as a good; however, not all are elected; and just as all pains are entirely evil by their nature, so not all are always to be shunned.
Pain is entirely evil, but we have to endure it sometimes for the pleasure that results. But pain is not "good." Pain can be instrumental to gain pleasure, but it is not "good."