Despair is, therefore, seen as a result of depression or melancholia, rather than a deadly sin. It is part of the appetites in so far as it starts in feeling, but as Catholics, we are called to overcome our feelings with grace and hope.
In other words, one's judgement is tainted by passion or habit of sin and, therefore, one cannot make a good judgment regarding God and His Mercy
Here is Aquinas on this point.
I answer that, Unbelief pertains to the intellect, but despair, to the appetite: and the intellect is about universals, while the appetite is moved in connection with particulars, since the appetitive movement is from the soul towards things, which, in themselves, are particular. Now it may happen that a man, while having a right opinion in the universal, is not rightly disposed as to his appetitive movement, his estimate being corrupted in a particular matter, because, in order to pass from the universal opinion to the appetite for a particular thing, it is necessary to have a particular estimate (De Anima iii, 2), just as it is impossible to infer a particular conclusion from an universal proposition, except through the holding of a particular proposition. Hence it is that a man, while having right faith, in the universal, fails in an appetitive movement, in regard to some particular, his particular estimate being corrupted by a habit or a passion, just as the fornicator, by choosing fornication as a good for himself at this particular moment, has a corrupt estimate in a particular matter, although he retains the true universal estimate according to faith, viz. that fornication is a mortal sin. In the same way, a man while retaining in the universal, the true estimate of faith, viz. that there is in the Church the power of forgiving sins, may suffer a movement of despair, to wit, that for him, being in such a state, there is no hope of pardon, his estimate being corrupted in a particular matter. In this way there can be despair, just as there can be other mortal sins, without belief.
Reply to Objection 1: The effect is done away, not only when the first cause is removed, but also when the secondary cause is removed. Hence the movement of hope can be done away, not only by the removal of the universal estimate of faith, which is, so to say, the first cause of the certainty of hope, but also by the removal of the particular estimate, which is the secondary cause, as it were.
Reply to Objection 2: If anyone were to judge, in universal, that God's mercy is not infinite, he would be an unbeliever. But he who despairs judges not thus, but that, for him in that state, on account of some particular disposition, there is no hope of the Divine mercy.
The same answer applies to the Third Objection, since the Novatians denied, in universal, that there is remission of sins in the Church.
To be continued