I first read Nora Ephron’s Heartburn a few months after she died in 2012. I’d have never noticed the paperback, tucked away in the cookery section of a typically chaotic bookstore in Kolkata, had not the memory of a beautiful obituary by her son, Jacob Bernstein, been fresh in my mind.

Until then, I hadn’t read Ephron in print. She was, to me, a writer of movies that I did not seem to care about as much as my friends thought I should. Sleepless in Seattle and Julie & Julia had reminded me, uncannily, of my own life. I was a little younger than eight-year-old Jonah in Sleepless in Seattle, when I lost my mother. I could sense what he went through.

And like Julie, in Julie & Julia, I was obsessed with cooking, though, as I would discover after reading Heartburn, it was really my “way of saying I love you” than expressing other, perhaps worthier, ambitions. But I was put off by Ephron’s Disneyfied romantic comedy (much as I adored Meryl Streep – who doesn’t?), her chocolatey endings, and the lack of sharpness in her plots. So I turned up my nose, passed up a chance to watch Heartburn, and returned to Woody Allen for my laughs.

But that evening in Kolkata, I looked at the baby-pink cover, fell in love with the illustration of a ring dangling from a dented fork, read the opening sentence of the blurb (“Is it possible to write a sidesplitting novel about the breakup of the perfect marriage?”), and took it home.

Funnily, or rather fittingly, as with most of my Ephron experiences, it proved to be the right moment to be reading the book.

I was recovering at the time, at my own snail-like pace, from a hideously imperfect love affair, a mistake so colossal that the thought of it now brings back to mind an immortal one-liner by Rachel Samstat, Ephron’s protagonist: “I felt like a character in a trashy novel.”

Rachel had found herself in Rona Jaffe’s scandalous potboiler, The Best of Everything. I would have probably put myself in one of those obscure French novels, where the hero feels existential angst crawling up his toes as he contemplates a boiled egg at breakfast, is always shrouded in a haze of cigarette smoke, and walks the dingy lanes of Paris eyeing the women of the night. I was nearly living this life – except for the last bit, of course.

To my credit, I was also busy turning my suffering into a big joke. From close friends to my therapist, anyone interested in my well-being was subjected to the full, vitriolic blast of my self-deprecating humour. This was just as well, as my therapist told me after two weeks of patiently sitting through what were effectively hour-long stand-up comedy shows, except that my performances were untouched by even a trace of kindness towards myself. Until I had read Rachel’s story, I did not quite get what she was trying to tell me.

Heartburn is narrated by 38-year-old Rachel Samstat, seven months pregnant with her second child, when she finds out her husband, Mark Feldman, is having an affair with the “giantess”, Thelma Rice.

The Ladies’ Central of Washington, which includes Rachel, had been hotly speculating whom Thelma is sleeping with all summer, so the knowledge, when it hits Rachel, is devastating at multiple levels.

In shock, she flies off with her two-year-old son, Sam, to New York, to stay at her father’s empty apartment, the old man “having been carted off to the loony bin” by her sister Eleanor. We gradually learn about the father’s third wife, who happens to be Rachel’s “former best friend Brenda’s sister”; her mother, a Hollywood agent who specialised in midgets; and her hamster-obsessed first husband, Charlie, who caught crabs by sleeping with – well, once again – Rachel’s “former best friend”.

Heartburn is based on Ephron’s relationship with her second husband Carl Bernstein (one half of the team that exposed the Watergate scandal), whose affair with Margaret Jay, the daughter of former British Prime Minister James Callaghan and the wife of former British ambassador Peter Jay, ended their marriage. Ephron’s first husband, Dan Greenburg, is not spared either. And least of all, Ephron herself.

She lacerated her own neuroses, sliced away at self-pity, mocked herself for not leaving her philandering husband fast enough – but without forgetting to delight in the absurd, to seek pleasure in the most ordinary activities (such as making the best mashed potatoes or four-minute eggs) and to see everyone, including herself, as being shaped by, and reacting (nearly always irrationally) to, circumstances that are (nearly always) beyond their control. I had been also shaming myself for my folly, cooking Mac ’n Cheese for supper way too often, but without gracing myself with the wisdom of self-forgiveness.

In spite of the neurotic edge to Ephron’s prose and Rachel’s dithering misery, Heartburn tells a story of heroism, not victimhood.

If its sarcasm slips into cynicism (“Show me a woman who cries when trees lose their leaves in autumn and I’ll show you a real asshole”), it also asks us to seek meaning in the maddening medley thrown at us by life. In his memorial, Jacob Bernstein remembered his grandmother Phoebe on her deathbed telling his mother to “take notes”. Ephron followed her instruction precisely, making every detail of her life grist to her mill, be it her love of food or psychoanalysis.

If therapy shows up the fragility of the choices available to us (“…the truth is that no matter who you pick, your neuroses mesh perfectly and horribly; the truth is that no matter whom you pick, he deprives you the way your mother and father did,” goes one of Rachel’s most inspired diatribes), food, with its reliably predictable taste, should it be made a certain way, provides a counter-ammunition to this nihilism. The latter is captured, quite literally, at the end of the novel, as Rachel hurls her Key lime pie at Mark at a dinner party, days before she finally leaves him.

Somak Ghoshal is an editor and writer based in New Delhi. His writings have appeared in The Telegraph, Biblio, Mint, Caravan, Open and Huffington Post