Yeah, balancing that level is a little tricky. (it was the last level, so you almost made it!)
Believe it or not, but it can actually be done without getting hit at all, but that requires studying where the mechs will go and placing EMPs at the perfect place.