Anyone who’s ever dated regularly, tried to score against LeBron James, or been a transplanted organ knows what it’s like to face rejection. But no one understands the pain of rejection better than a first-time novelist looking for an agent.

It all starts with writing a query letter asking for the thing you probably won’t get, like a toddler who wants a cookie before dinner. My own query pled my case as a TV writer and a frequent Web contributor, while attempting to distill the novel I’d worked on for years into a single paragraph that almost made sense. I included the first 10 pages of the novel and hit 22 agents in 30 days, like a budget tour of Europe during which you see nothing.

Which is exactly what I saw for the next month: nothing. Many agents simply don’t reply if they’re not interested; it’s the same reaction you’d get from shouting “Hey baby, hey baby, hey baby” at a woman on the street, although hopefully you wrote a stronger query letter than that. But even the deafening silence that seemed to shriek of my incompetence, not just as an author but as a writer of query letters, would soon seem preferable to the sting of the actual rejection.

The first thing I learned about rejection is that agents are very, very sorry—nearly every rejection contains an apology or some regret: “I am sorry, but we cannot take it on at this time”; “We regret to inform you...”

Some of them are frightened: “I’m afraid I have to pass”; “I’m afraid this isn’t right for me.” How can you get an agent if you keep scaring them like that? It seemed that my timing was terrible: many rejections concluded with phrases like “not right for us at this time,” with no indication of a better time in the future—or even the past, should I invent a time machine. They also wished me “all the best,” although not enough to want to represent me.

Obviously, these are mostly form rejections. Because when you say no as often as a literary agent, new puppy owner, or parole review board, it’s hard to personalize it. And of course, it isn’t personal: they just hate you and your writing, and, if you included an author photo, your face. But these anonymous rebuffs seemed positively morale boosting compared to the very personal rejections that followed: “I’ve read about 75 pages of this, but I’m having trouble with the flow of the narrative. I don’t feel it makes sense for me to continue reading.”

“I know you have a background in TV writing, so maybe those habits are playing a part here. Regardless, I’m so swamped with manuscripts that [I’m going to pass].” And this oddly specific one: “I also happen to represent one of the more famous amputees in media, and I think [your novel about a man whose arm is amputated] would present a bit too much overlap” (even though his books are memoirs).

As humiliations go, that kind of rejection is like a classic supervillain’s origin: “Refuse me, will they? I’ll show the fools! I’ll destroy them all!”

And then, just as I’d begun work on my global death ray, I received this email from Mitchell Waters at Curtis Brown: “Thank you for querying me about your novel. Your letter and your sample pages had me laughing out loud and thinking about many things. I would love to read the entire manuscript. Is there any chance that it’s available on an exclusive basis, even for a short period? By the way, you wouldn’t happen to be the Ken Pisani with whom I graduated from Bayside High School, would you?”

When I’d queried Mitchell, I had no idea that we had gone to high school together; it was only when he replied that the name suddenly rang a bell. And now I had in my hands a letter saying, “Your pages made me laugh, I’ll read the manuscript, can I have an exclusive?” That’s three cherries on a slot machine. Throw in the gobsmacking coincidence that we once knew each other as clumsy teens in Queens, and it was enough to make me forget all about the formal rejections that hated me, my writing, and my face.

A short time later, I was a first-time novelist with an agent. Dream-come-true stuff! But then it was time to wake up—and for Mitchell and me to face the serial rejections of publishers together.

Ken Pisani writes for film and television. His debut novel, Amp’d, will be published by St. Martin’s in May.