By the time I was 23 years old, I had written five unpublished novels and received more than 500 rejections. I was teaching in New Jersey, at the Saddle River Country Day School—then in its second year of existence—where I was the entire English department. I taught seventh-, eighth-, ninth, 10th-, 11th-, and 12th-grade English and lived in a small upstairs room in what had been servants’ quarters (the school used to be a mansion). The only other person living there was the school’s gardener, Stiney.

Stiney was in his mid-50s, had daily conversations with birds and animals, and believed the FBI was sending agents into Saddle River to kill him. He showed me stones he kept on electrical wiring in his room to prevent electricity from leaping out when it had to turn corners. He also showed me trunks filled with rocks possessing magical properties that enabled him to predict the future. Our rooms were about 10 ft. apart, and since the lock on my door was broken, he would visit me most evenings to tell me stories about the FBI, American Indians, and my future.

For most of that 23rd year, I did no writing at all. It was a year my previous novels continued to be rejected, and my brother, Robert, had the first of a series of psychotic breakdowns and hospitalizations that would mark his life for the next half century. Several times each week, I drove from New Jersey to Queens to visit Robert at psych wards and mental hospitals. Although I loved teaching, when the school day was done, I found myself depressed and afraid that I would either wind up behind locked doors with my brother, or spend the rest of my life unpublished, a 9 a.m.–to–3 p.m. tutor to the children of wealthy families.

Then, in early April, Gladys Spann Matthews, a teacher at the school, sat down next to me at lunch and plunked a fat brown envelope onto the table. “I once tried to make a book out of this and couldn’t do it,” she said. The envelope contained the memoirs of José Policarpo Rodriguez, a Mexican-American whose grandchildren had been her students in Austin, Tex. One of these former students wrote a composition titled, “The Most Famous Guide in Texas History.” Along with a copy of the memoirs, Matthews gave me drafts of the book she’d tried to write, transcriptions of anecdotes she’d heard from the grandchildren, and a loving admonition: that I use the material as the basis for a fictionalized biography for young people.

The next day, for the first time in a year, I began writing again. I completed a draft of a new book in several months, and I also began writing short stories, something I’d never done before. By the end of the school year, one of the stories was accepted, and I had my first publication. Three years, three books, and 1,400 rejections later, I sold my first novel. Several years after that, my first young adult novel, Poli: A Mexican Boy in Early Texas, the book that I began at the urging of Matthews, was bought as well.

Through the years, whenever I’ve been visited by short-term depression (literary or personal), I’ve given myself the kind of challenge Matthews gave me. In a state of literary melancholia some years back, I took on the assignment of writing a short story every week for a month, each one five typed pages, the author forbidden to leave home on Friday until the assignment was completed. Descending into mild literary glooms more recently, I thought of two favorite books, Invisible Cities and Henderson the Rain King, and gave myself an assignment I imagined Calvino or Bellow might have given himself—the task of writing about what I did not know. I began setting stories (and a novel!) in places I’d never seen.

At about the time Poli was published, I was surprised to find the following passage in the journals of Henry James, a writer I’d thought immune to anything resembling a literary funk: “The sense of being utterly out of it weighed me down.... All these melancholies were qualified indeed by one redeeming reflection—the sense of how little, for a good while past... I had been producing. I did say to myself ‘Produce again—produce; produce better than ever, and all will yet be well.’” And the next morning: “I take up my own pen again.... It is now indeed that I may do the work of my life. And I will.”

Me too.

Jay Neugeboren is the author of 21 books. Texas Tech University Press will publish a special 25th-anniversary edition of Poli: A Mexican Boy in Early Texas in December.