The Ego is something that inevitably influences important life decisions you make.
While consciously knowing that ego-driven decisions tend to be bad, it's hard for people to free themselves of that influence.
Aware or not, the way I found to beat my ego consistently is to give it space. Listen to what it has to say. When in a discussion with someone where your ego starts to make itself noticeable, let it run. Give it space. Talk it through.
The moment you give your ego space is the moment you put yourself in a position of winning against it. Because surely there are new ways to please the go that do not involve making a decision you will regret.