Died a couple of times in that bit, too.
It took me awhile to realize, but the backpack in the centre of this area respawns with time, so just use your favorite weapons to deal with the enemies.
The red mechanoids can be destroyed with one canonball, if you make the canonball land right on top of their head. If it rolls or falls on another part, it`ll take two hits.
I used the rocket launcher and the machine gun to get rid of the blue mechanoids. It`s save you quite a bit of trouble if you manage to kill them quickly- if you allow a bunch of them on-screen one at a time, you`ll have laser blasting around you everywhere, and at that point they are much harder to dodge than rockets (which are slow and can be shot).
I stayed in the yard, going into a tunnel will get you killed- close quarter battle with the red mechanoids is impossible as they will just fire the rockets just before their feet, and you will get hit whichever side of them you stand.
The enemies appear from the tunnels in pre-programmed orders- memorize from which tunnels they appear, and when you know they`re coming, send seven rockets or a canonball to tunnel they come from. They`ll be dead before they can get into the yard.
Also, try and make the mechs fire into each other. Lining them up will aloow you to be more efficient with cannonballs, too.
If you`re done with the mechs, you will get skeletons with mechs

that was IMO easier than the mechs only, took less long or something. have fun