51 And yet, although chastity pledged to God is a difficult virtue, those who after serious consideration generously answer Christ's invitation and do all in their power to attain it, can perfectly and faithfully preserve it. For since they have eagerly embraced the state of virginity or celibacy they will certainly receive from God that gift* of grace through whose help they will be able to carry out their promise. Wherefore, if there are any "who do not feel they have the gift of chastity even though they have vowed it," let them not declare they cannot fulfill their obligations in this matter. "For," says the Council of Trent, quoting St. Augustine, " 'God does not command the impossible, but in commanding serves notice that one do what he can, and pray for what he cannot,' and He helps us to accomplish it." This truth, so full of encouragement, We recall to those also whose will has been weakened by upset nerves and whom some doctors, sometimes even Catholic doctors, are too quick to persuade that they should be freed from such an obligation, advancing the specious reason that they cannot preserve their chastity without suffering some harm to their mental balance. How much more useful and opportune it is to help the infirm of this type to strengthen their will, and to advise them that not even to them is chastity impossible, according to the word of the Apostle: "God is faithful, who will not suffer you to be tempted above that which you are able: but will make also with temptation issue, that you may be able to bear it."
Source: Sacra Virginitas (Vatican.va)