I just replaced a D17A1 in my '03 Civic which is the same engine in your car (1.7L, non-VTEC, SOHC). The main reason I changed it out was because it was continually overheating, but you may not need to go that far with yours.
First, if you didn't get a thermostat from Honda (and they aren't cheap in comparison to a Gates - for me it was $38 vs $7), it's what the car uses and doesn't like the aftermarket ones.
You also need to be running the blue A3 Honda coolant in it. Regular coolant will cause issues with the cooling system.
If you have the right thermostat, and the engine was properly purged of air, you probably have a leaking head gasket.
If the conditions for the cooling system are, as long as you are topping the coolant off daily, the engine will not overheat, then you most likely have a slow head gasket leak, most likely into a cylinder. This is a very common malady for this engine. On my car it was cylinder #3. I could tell for sure once I got the head off as the piston head was really easy to clean off, while the the other three had a little cake of carbon on the crown. Here's what it looked like after cleaning them off:
It starts with #1 on the right. I used a rag to clean the piston crown off for #3, while I used a scraper on the other three.
Anyway, if you are handy, the job really isn't hard to change out the head gasket. It should solve the issue as long as there's no damage from the overheating (like a warped head). You'll need a complete upper end gasket set as well as a set of head bolts. While you're at it, change out the timing belt and water pump (if you haven't done it lately) since you're already in there. I also changed out the clutch while I had it apart.
As for why I replaced the engine, when I tore it down, I realized the camshaft was in pretty poor condition. It wasn't smooth like it was supposed to be. I bought a JDM replacement engine for it, which is a D17A VTEC version, though I'm running it without VTEC. It was cheaper to purchase this JDM engine with about 50k on it, than it would have been to buy all the parts to replace the cam and rockers. My car has 162,000 miles on it for reference. I think the car has been exhibiting this kind of behavior for a while now.