This is some of the worst writing I've seen. It's bad enough that the premise about a marriage that goes wrong over an affair is totally worn out, but the elements that build the story are ridiculous, starting with a wedding that gets stalled because the bride gets cold feet, and all these people, one after another, go into her room to convince her to come out, and meanwhile, they try to create humor over the fact that the wedding is being delayed many hours, and none of it was funny. Why does she get cold feet? Because her imminent husband is famous for being a philanderer. And what happens after the wedding? He philanders. But not immediately. First, you have to sit through all this domestic stuff, such as them having a home built in which the builder forgets to include a back door. I think that was supposed to be funny too. Then, when it gets to her finding out about the affair, it's just an abrupt left turn in the story. There was no context to it. It was more like an inevitability.
Then, it goes to how she handles it, and not well. When she tells her father that her husband Mark is having an affair with this Thelma Something, the father's response is, "Do I know her?" Then he says that she might as well give her child to them, and also her second child after it's born. When she tells a close friend that the reason she's upset is because her mother died (which was true, but it happened a while ago) the friend says that it's not the so bad really because losing your mother can be liberating. How do you come up with characters like that?
The writing, the dialogue, the endless effort to show you how crowded New York City is, everything about this movie stinks. That includes the title: Heartburn. What a horrible script. It doesn't get much worse than this.