L293D overheated but not burned !! what's the solution ?

firashelou:
so about the piece of metal for heat sink, it should be connected with a wire to the pins ?

No, that will not work.
Ideally, those pins (Gnd - 4, 5, 12, 13) should be soldered to a "ground plane", with the underside of the IC laying right on the copper of the "ground plane". That's how the heat gets drawn out - mechanical, physical contact.
Barring that, any heatsinking will have, at best, only marginal effect.
I would not anticipate any marked result from clamping a piece of metal atop the IC.

The L293 is a #%@& IC that people expect too much from.

Why is this being discussed in "Microcontrollers"?