Sloth, according to Damascene (De Fide Orth. ii, 14) is an oppressive sorrow, which, to wit, so weighs upon man’s mind, that he wants to do nothing; thus acid things are also cold. Hence sloth implies a certain weariness of work, as appears from a gloss on Psalm 106:18, “Their soul abhorred all manner of meat,” and from the definition of some who say that sloth is a “sluggishness of the mind which neglects to begin good.”
Now this sorrow is always evil, sometimes in itself, sometimes in its effect. For sorrow is evil in itself when it is about that which is apparently evil but good in reality, even as, on the other hand, pleasure is evil if it is about that which seems to be good but is, in truth, evil. Since, then, spiritual good is a good in very truth, sorrow about spiritual good is evil in itself. And yet that sorrow also which is about a real evil, is evil in its effect, if it so oppresses man as to draw him away entirely from good deeds. Hence the Apostle (2 Corinthians 2:7) did not wish those who repented to be “swallowed up with overmuch sorrow.”
Accordingly, since sloth, as we understand it here, denotes sorrow for spiritual good, it is evil on two counts, both in itself and in point of its effect. Consequently it is a sin, for by sin we mean an evil movement of the appetite, as appears from what has been said above (10, 2; I-II, 74, 4).
(Summa Theologica, II.2.Q35.1)