Yes. Every evil comes under pain [pain here means "penalty"; such was its original signification, being derived from the Latin, "poena"] because pain and fault do not divide evil absolutely considered, but rather evil that is found in voluntary things.
Evil is the privation of good, which chiefly and of itself consists in perfection and act. Act, however, is twofold; first, and second. The first act is the form and integrity of a thing; the second act is its operation. Therefore evil also is twofold.
In one way it occurs by the subtraction of the form, or of any part required for the integrity of the thing, as blindness is an evil, as also it is an evil to be wanting in any member of the body.
In another way evil exists by the withdrawal of the due operation, either because it does not exist, or because it has not its due mode and order. But because good in itself is the object of the will, evil, which is the privation of good, is found in a special way in rational creatures which have a will.
Therefore the evil which comes from the withdrawal of the form and integrity of the thing, has the nature of a pain; and especially so on the supposition that all things are subject to divine providence and justice, as was shown above (Q22, A2); for it is of the very nature of a pain to be against the will.
But the evil which consists in the subtraction of the due operation in voluntary things has the nature of a fault; for this is imputed to anyone as a fault to fail as regards perfect action, of which he is master by the will. Therefore every evil in voluntary things is to be looked upon as a pain or a fault.