Drawn out melee combat has been very rare - there are those that argue that drawn out melee was rare even when melee combat was the main way of fighting, subscribing to the idea of "pulse" combat, where sides would meet for melee for a brief time, one side break or both stepping back to catch their breath and buid up courage for another "pulse" of melee combat.
I'd say the actual psychology, unit cohesion and discipline of the unit would be much more important than wether or not it was armed with spears, swords or bayonets mounted on muskets or rifles.
A unit more willing to charge home and go into melee will most likely win the fight, with the other unit retreating or routing - which usually meant pursuit by enemy cavalry, which did most of the killing on pre-modern battlefields.