Confused with my feelings ?

I don't know if any of you go through the same thing but I notice a lot in myself when I start liking a guy I get giddy and excited and wanting to meet them again and I'm literally on cloud 9 
Then I get this wave of sad emotion where I put up a wall and want to shut them off and I get really insecure. 
How can I avoide this from happing ? 
It's like I want them in my life but at the same time I don't cause I don't want to the rejection :/