From the Catechism
2091: 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.
1856: When the will sets itself upon something that is of its nature incompatible with the charity that orients man toward his ultimate end, then the sin is mortal by its very object… whether it contradicts the love of God, such as blasphemy or perjury, or the love of neighbor, such as homicide or adultery…
I think you would need to experience very deep despair, and you would have to WANT to experience the despair, for it to be considered a mortal sin.