need help

.again
I had another impure thought which i am confused wether i commited a mortal sion or not. i have confessed the thought that i have just spoken about but i have another now.
I was walking towards a person at work a thought started however i dont know if i started it or not and when i got closer to her i turned the other way not facing her and continued to walk with the impure thought in my head. i dont know if i started it but i know that i may have entertained it for 2 seconds.
what do i do. the fact is I am fighting this problem a hundrend times a day every single day. and at least once a week i might fall. i go to confession every week and i feel that i am overdoing it with confession but i need to go otherwise i will not be able to go to communion. what do i do, what do i do. i am starting to loose it because i pray because of this problem and i am always fighting this.
So if i started the thought and briefy entertained it it mortal sin
if i didn’t started the thought and briefy entertained it its only venial.
WHEN i say briefy entertained it is just in my head.