Accidentally viewed an inappropriate image and been having impure thoughts
Hello,
So, today I was looking up a disease and when I clicked on Wikipedia it showed me a picture of male genitals and I instantly clicked off the page I thought Wikipedia was a safe place, but I guess not should this be confessed? I truly did not intend for this to happen I have been trying to avoid things such as porn and masturbation I truly want nothing to do with it. I also have been dealing with impure thoughts, I haven't watched porn in well over a month and haven't masturbated in 3 weeks but I still have these urges I fight them off and pray when I can, but am having these impure thoughts such as seeing a naked woman in your mind a mortal sin? I've read that only if you dwell and act on it, it is so I have been trying to get rid of these thoughts as soon as they pop into my head. I also have been having inappropriate dreams and have somehow been able to force myself awake before having a wet dream. But I just fear that I am in a state of mortal sin even though I don't believe that I am I haven't done anything wrong besides having these impure thoughts and also what happened today, but I do not act out on these thoughts or give in to them I fight them off with everything I have. But, maybe I am being too prideful and refusing to accept that I am committing mortal sins every time I have impure thoughts. These past 3 weeks since my last confession have been tough mentally, I just fear that when I die or when the Lord comes in the second coming that I will not enter the gates of heaven and this makes me depressed, I have been praying every day to God, but I feel as though this isn't enough because God is just, and it doesn't matter how good of a person is if that person is a sinner they have destined the same fate as those are not good.