I had a problem like this (1987 175 merc) and it turned out to be plug wires. I rebuilt or replaced the entire fuel system and most of the ignition components. It can be a LOT of different things, but in my case it was the plugwires (exact symptoms you describe above).