Is it a mortal sin if one accidentally lies in Confession about a venial sin?
You cannot “accidentally” lie. A lie is a deliberate distortion of the truth. It cannot be an accident. People can makes mistakes, say things that are false “accidentally”, but people cannot lie “accidentally”. Lying is intentional.
Lying about anything is a sin, more or less grave depending on the matter and the situation.
Lying during confession, however, is grave because of the circumstance.
Lying during confession is also a misuse of a sacred thing, a sacrament, which makes it also the sin of sacrilege. One act, two sins.
“Bless me Father, I have sinned. My last confession was yesterday. During my last confession I lied about something. In doing so, I also committed the sin of sacrilege. I deeply regret so mistreating the Sacrament of Penance. I lied about X. Before that my last confession was two weeks ago. The sins I confessed yesterday were these: A two times, B once, and C three times. For these and any sins I cannot now remember, I am sorry. I ask a penance and your absolution. My Jesus, mercy.”
God hates lies. God cannot be fooled. You cannot escape God.
Remember Proverbs 6: 16-19:
Six things there are, which the Lord hateth, and the seventh his soul detesteth: Haughty eyes, a lying tongue, hands that shed innocent blood, A heart that deviseth wicked plots, feet that are swift to run into mischief, A deceitful witness that uttereth lies, and him that soweth discord among brethren.
Of the six things that God hates, two of them concern liars.
Go to confession.
Confess all your mortal sins in both kind (what kind of sin) and number (how many times or how frequently you committed each kind of sin. Don’t hesitate. Just say it. Don’t chat. Don’t beat around the bush. Don’t ramble. Don’t add all sort of extraneous and pointless words or details. Be blunt. Omit nothing.