i go 1v4 AI, on med and win as terrain and protoss.
(i cant do it as zerg lol)
If ANY Zerg are on the other team, you have to plug up that little outlet in front of your base. Build all of your structures there and use units to fill the gaps.
Even then, some people easily forget the fact that probes/SCVs/drones can attack just like other units.
If you're terran, just lift up that command center and let the SCV's take care of the Zerg rush. It will cost you a couple hundred minerals, but it won't ruin the game right away.
I save the replay of every game I lose, too. Usually to copy the build order of the guy who beat me, and ways to improve upon my previous strategy.