You should make an act of perfect contrition; then you will be forgiven by God and you will no longer be in a state of mortal sin. Here’s how:
Pray for true sorrow for your sins.
Pray for true love for God and neighbor.
If you are truly sorry for your sins, pray to God telling Him that you are truly sorry because you know that your sins offend God, whom you love, and because you know that your sins harm your neighbor, whom you also love.
True sorrow for sin out of love for God and neighbor is called perfect contrition, not because you have to be perfect, but because the motivation for the sorrow (love for God and neighbor) is the most perfect reason to be sorry for sin.
Once you make such an act of perfect contrition, you will be forgiven.
Then go to Confession at your first opportunity.
Some prayers you can say:
O God, in your great Mercy and Love, grant that I may sincerely and thoroughly repent from all my sins, and humbly and devoutly receive your forgiveness through the Sacrament of Reconciliation, and grant this same merciful grace to other poor sinners, especially those most in need of repentance and forgiveness.
Merciful Jesus, I offer you my little prayers and sufferings, united with your great prayers and sufferings on the Cross, for the conversion of sinners. In your great Mercy and Love for all, grant that we may sincerely and thoroughly repent from every sin, and humbly receive your forgiveness in the Sacrament of Reconciliation.
Ron Conte