On a June night in 2004, I sat in the back yard of a Brooklyn bistro discussing “Fahrenheit 9/11” with my date. We were both disgusted with the Bush administration, a quaint sentiment now that we’re faced with a prospective Trump presidency.

While I primarily expressed my outrage by yelling at the television, my date went to marches, manned phone banks and organized a yard sale that raised $1,500 for the progressive group MoveOn.org.

He cared about the larger world, but he also knew how to have a good time — he played in a band, threw parties and made floats for the city’s Mermaid Parade. So I was happy when he suggested we walk through his neighborhood — even happier when we kissed on the stoop of his building.

I was about to head out of town for July 4th weekend. We agreed to get in touch after that.

I never saw him again. In a devastating email the next week, he explained: He had started dating another woman about the same time as our first date, and while I was away things between the two of them took off. He didn’t feel comfortable seeing two women at once. He felt torn and miserable, but he decided to pursue things with the other woman.

He was entirely decent about the whole thing, which made it worse. It would have been easier if I could have written him off as a jerk, but instead I had to face a harsh truth: He was good man who made a choice, and it wasn’t me.

Naturally, I did the least productive thing possible: I obsessed about the other woman. Who was she? What qualities did she possess that I lacked? The fact that I had no way of knowing this didn’t deter me from reaching a firm conclusion: She volunteered for important causes. She was good; she was better than me, a hollow woman who deserves to be alone.

One rainy evening about two weeks later, I was walking home with supermarket sushi, still wallowing in the story of how much I suck, when it hit me: If you feel bad about yourself for not volunteering, then volunteer.

My first effort was embarrassingly obvious. I organized a building-wide stoop sale for MoveOn. I knew it was weird to copy him, as if on some irrational level I was trying to win him back. Regardless, my friend Jessica and I raised $600 selling our neighbors’ old paperbacks and gym equipment. We had fun, too. After making the donation, I had a peculiar feeling. Then I then thought: “Oh, this is what it’s like to feel good about yourself.”

I suddenly realized that the path to self-respect was remarkably simple: Behave in a way that you’re proud of. It had nothing to do with winning first prize or gaining the love of a cute, smart person. It was something to develop gradually, almost invisibly, by working for something larger than myself.

The next weekend, Jessica and I went to Pennsylvania for a get-out-the-vote drive, and I was surprised by how much I loved it. Yes, some people slammed doors in our faces. But most were happy to pause from their leaf-raking or car-washing to assure us that John F. Kerry could count on their vote. I returned to Pennsylvania a second time, and then spent the weekend before the election canvassing in Ohio with my friend Caitlin.

I learned of Kerry’s loss the morning after the election, when I woke up on a bus in New Jersey and heard Caitlin crying. We tried so hard and had come up empty.

The following summer, I became involved with a man who didn’t treat me very well. He wasn’t a bad person, but he was confused about what he wanted and … well … he just wasn’t that into me.

“I want to put the woman I’m with on a pedestal,” he said. “But you probably wouldn’t like that. You probably wouldn’t be comfortable with that.”

“Oh no,” I said. “I’m perfectly comfortable with that.”

I was deeply hurt, still replaying the story of “the girl who isn’t quite good enough,” but something was different: The idea that a good man would love me deeply and passionately no longer seemed foreign or unattainable. I hadn’t found a romantic partner, but over that year I had begun repairing the damage that years of searching for love and acceptance in New York City had wrought. After years of trying to build my self-esteem through the obvious ways — working out, wearing nice clothes, pursuing professional success — I discovered a way to like myself even if nobody else agreed. It was the most liberating thing that has ever happened to me.

I met my now-husband shortly after that conversation. Mark and I watched together as the nation elected its first African American president. We have marched at Occupy Wall Street, attended city council meetings, and, last year, threw a house party for our newly adopted city’s progressive mayor. Sometimes we watch the debates together, giving the TV the finger at appropriate moments. Sometimes we watch “Nashville” instead.

Although I grieve the years I spent letting men determine my worth, I’m also glad those repeated heart stompings helped me find the part of myself that couldn’t be destroyed.