I would like to have the opinion of those who are more knowledgeable in Pali about the following analysis:
SN 42.12
tatra, gāmaṇi, yvāyaṃ tapassī lūkhajīvī attānaṃ ātāpeti paritāpeti,
kusalañca dhammaṃ adhigacchati, uttari ca manussadhammā
alamariyañāṇadassanavisesaṃ sacchikaroti. ayaṃ, gāmaṇi, tapassī
lūkhajīvī ekena ṭhānena gārayho, dvīhi ṭhānehi pāsaṃso. katamena ekena
ṭhānena gārayho? attānaṃ ātāpeti paritāpetīti, iminā ekena ṭhānena gārayho.
Here, headman, reagarding the ascetic leading a rough life who torments
and tortures himself, yet achieves a wholesome state and realizes a
supra-human state, an attainment in knowledge and vision that is
suitable to the noble ones, this ascetic leading a rough life, headman,
may be disapproved of on one ground and praised on two grounds. And what
is the one ground on which he may be disapproved of? He torments and tortures himself: this is the one ground on which he may be disapproved of.
AN 10.94
“yañhi, gahapati, tapaṃ tapato akusalā dhammā abhivaḍḍhanti, kusalā
dhammā parihāyanti, evarūpaṃ tapaṃ na tapitabbanti vadāmi. yañca khvassa
gahapati, tapaṃ tapato akusalā dhammā parihāyanti, kusalā dhammā
abhivaḍḍhanti, evarūpaṃ tapaṃ tapitabbanti vadāmi.
"If, when an asceticism is pursued, unskillful qualities grow and
skillful qualities wane, then I tell you that that sort of asceticism is
not to be pursued. But if, when an asceticism is pursued, unskillful
qualities wane and skillful qualities grow, then I tell you that that sort of asceticism is to be pursued.
So on one hand we have a categorical rejection (attānaṃ ātāpeti paritāpetīti, iminā ekena ṭhānena gārayho - he torments and tortures himself: this is the one ground on which he may be disapproved of) and on the other hand a recommendation (evarūpaṃ tapaṃ tapitabban - that sort of asceticism is to be pursued).
[edit: I no longer think that what follows is accurate:]
The distinction is highlighted by the difference between tapati and ātāpeti. Tapati primarily means to shine, to burn (about the sun), and by extension to bring (somewhat passively) hardship and remorse. The verb tāpeti is the causative to tapati, meaning to make shine, burn, to actively bring harship, to torment. According to Duroiselle, the prefix ā- means to, at, towards, near to, until, as far as, away, all round, so it may be taken as an intensifier that makes ātāpeti mean to systematically torment oneself, to torture oneself.
So it may be gathered that tapati relates to situations where hardship comes to happen on its own, without being specifically pursued and is to be simply endured, whereas ātāpeti relates to situations where hardship is intentionally created and pursued. The former is fine provided it allows kusala dhammas to grow and makes akusala dhammas fade, but the latter is categorically rejected.