So here's the thing. I am a good looking(as per many many girls) 23years old guy. I don't usually talk to girls or start conversation with girls but whenever a girl comes to me or just casually notice me or smile at me, I get crazy , I starts to think about that girl and I even loose my focus on the work that I was doing.
I don't know why but even a very small eye contact with a girl makes me crazy, I will start thinking about that girl and will do everything good in front of that girl to impress her more and more. Even after coming home, I can't stop thinking about her.
After few days it will become normal and I will forget about her and then again if some other girl do that my mind again repeats this process.

A girl talks to me and we exchange numbers we talk for a day and after that I don't continue the talk and just end it there, then I move to some other girl that talks to me and so on and on and on..

And if I was doing a very important work and a girl came in between and just smiled at me or talked to me casually then after that my focus will shift from my work to that girl, 90% pf my focus will be on girl and 10% on my work, even when driving I will think of ways to impress all the girls that smiled at me or talked to me.

Basically the thing is that if any girl look at me or make eye contact or just smile at me, I will get crazy for her, like I will start thinking about her for some days. I loose focus and I will masturbate many times thinking about that girl.
What should I do?

Sorry for my poor English, not a native speaker.