You buy the games because they're cheap and seem like a steal. You don't want to lose the opportunity to buy the game and that's the whole point of a sale. However, sales will show their heads again and again and if you have a decent backlog, you'll have enough games to keep you busy until the next sale.
I've used these measures to restrain my spending a bit lately. They are:
1) Realize how much money I've spent. I checked on my Steam settings and I've spent around $200 on games, almost all bought on sales (Steam only, haven't even bothered with GOG ones). True, they were good deals and good buys but what's the point of owning games I don't even have the time to play? The oldest unplayed game was bought on april 2009 and it's gone for cheaper since then. So what i've done is I've taped a sticky note with "$200.00!" written on it to my monitor, so the next time I see a good sale, I'll look at how much I've spent, instead of how much I'm saving.
2) Gave the credit card to my wife. I trust her and she doesn't use it. If I want to buy a game, I'll actually have to ask her for it and she already knows I have a decent backlog, so explaining to her why I really, really want a particular game is a hassle. This doesn't stop me from buying games (it's my card anyway) but it puts a hamper on impulse buys.
3) It also helps to know you have similar games to the ones you intend to buy. Sometimes that stops me from buying sequels of games I haven't played yet, or genres of games I've already got a couple lying around. That way, if I feel like playing a shooter, i'll go to my backlog instead of checking what shooters are on sale.
4) Before clicking the "buy" button ask yourself "Will you REALLY play the game anytime soon? Are you buying it because it's cheap, or because you really like it?" This usually helps me think my decisions twice.
And as a cherry on top,
this is a link to a Cracked article. They are a humor site, but I saw myself totally identified with point #3.