That's a common trap that I used to get into when I was chip leader. I usually fold now rather than testing my luck to vanquish my imaginary foe. They're probably thinking that they have one up on you too. So you use that to fool them into your monster hand by playing it as a bluff. It has to be a monster hand where you're sure the other guy doesn't have a stronger out. Otherwise you've just tricked yourself again. Ego doesn't amount to chit in the long run. The only thing that manners is keeping your wins. If you lose to a jerk who has owned you all the time, well it happens. Dust yourself off and improve your game. Don't try to improve it with hasty corrections.
seriously, if you have to ask how to control emotions while playing poker, you shouldn't be playing poker for serious cash. Because if you can't control your emotions how can you possibly believe you are reading other people correctly. ...it should just be a fun game for you, and you shouldn't care about the cash. that said, imho, (knock on wood), first thing is to forget about the money. They are just chips. You must get in the mindset that you are not winning or losing money, you are winning a card game and that is all.