CCC 2091 The first commandment is also concerned with sins against hope, namely, despair and presumption:
By despair, man ceases to hope for his personal salvation from God, for help in attaining it or for the forgiveness of his sins. Despair is contrary to God’s goodness, to his justice – for the Lord is faithful to his promises – and to his mercy.