Actually the military has done studies on ths, as have most of the more hardcore mecha heads (like me). The conventional anime mecha that actually pretend to follow the rules of physics (sorry, no metal gears or gundams, think the ones from Gaziraki) and therefore the ones that might be acheivable in the near future are expected to be much better for defence on rough terrain than any current unit. As in Gaziraki they would generally use infantry tactics, writ large. They would dominate urban, dense forrest, and mountainous terrain.
The main question once they are a practical thing to produce is wheather they would be cost effective. Sure they can carry a crap load of armor and weapons, but as many have pointed out they would still have the same glaring weak spots we humans have. Our joints, in particular ankles and knees for the prototypical mecha. The combat arm they would be intended to replace, the infantry, would still be thier greatest threat.
That's why the military has mostly given up on mecha research and is focusing on power armor. Sure you'd need more units to match the power of one mecha, but that also means that if you loose one unit, you still have some left instead of none. It's the same thought that was behind the standard US infantry squad organization going into WW2. It was felt that the optimal infantry fighting team was two 2 man fireteams (4 people) so they made a squad three 2 man fireteams and a squad leader (7 people). That way, the squad could take 3 casualties and still have the optimal composition.