Flash atmega 8u2 on arduino mega with another arduino mega as ISP
Here's a few things you might be doing wrong, or that you can try:


Are you connecting to the 6-pin header that is adjacent to the 8u2? That's the ISP port for that device
As described here, if you are using the arduino ISP sketch in the Arduino 1.0 or later environment, you have to modify the ArduinoISP sketch slightly; delay(20) instead of delay(40) in the heartbeat function.
You could always break down and buy a real ISP programmer (I recommend the AVR ISP mkII), and then use AVR Studio to flash your 8u2 with the appropriate hex file.