I think so. If you make a good act of contrition (be truly sorrowful for what you’ve done b/c you’ve offended God–and Jesus who died for you), repent, and promise to get to Confession at the first opportunity, I think He will restore you to at least a partial state of Grace.