Pope Paul VI
Sacerdotalis Caelibatus §87
Sacerdotalis Caelibatus: On the Celibacy of the Priest
87 Mother Church takes particular interest in what befalls young priests who, no matter how great the zeal and enthusiasm with which they entered the sacred ministry, have nevertheless been troubled later on in performing their duties by feelings of hopelessness, doubt, desire, or folly. Hence, especially in these circumstances, it is the wish of the Church that every persuasive means available be used to lead our brothers from this wavering state and restore to them peace of soul, trust, penance, and their former zeal. It is only when no other solution can be found for a priest in this unhappy condition that he should be relieved of his office.
Source: Sacerdotalis Caelibatus (Vatican.va)