I really fucked up today

To make a long and depressing story short, I let my feelings take over my actions and it ruined the game I had built up on this girl. I know there are other women out there and I got over this one but I want to prevent this from happening again.

How do I control my feelings to stop impulsive actions?