From what you guys said, it seemed to me that I had a similar problem.
I also have a 98 mazda 626 4cyl.
The car was sort of galloping or jerking forward when I put it in gear.
It also sort of sputtered when i stomped on it and it was just terrible plus the check engine light was on.
Then it started to do it when it I was sitting in idle and reving it up.
I went to my local mechanic (a dude certified by mitsibishi to be a master mechanic) and he told me that it was the clutch and the timing belt.
When I gave him the car to replace the clutch and timing belt, he told me that my drive belts were in pretty bad shape and my water pump was leaking and barely working.
After I replaced the clutch, timingbelt, all the drive belts and the water pump, the car has not had that problem since. I got that done about 2 or 3 months ago. It drives like a chemp.
Also make sure that you have no dirt or water around your spark plugs.
I hope this helps.
martin626