Writer Steven Petrow with his dog, Zoe. (BETHANY CUBINO/CHASING SKIES PHOTOGRAPHY)

I was patiently waiting at the security desk to enter The Washington Post’s building a couple of months ago when a former college classmate — a fellow I’d not seen in decades — stepped up behind me. I recognized him and said hello, but he appeared to have no memory of me. When I reminded him that we’d once worked together on the Duke newspaper, he peered at me quizzically, as if I weren’t telling the truth. Then said: “You’re old, too, eh?”

For the record, I am 58. But I don’t think of myself as old. And no, I don’t live in the State of Denial. Perhaps my college classmate was just kidding, but it got me to thinking about why some people think they’re old — and why I don’t.

After all, we’ve both been steeped in the stereotypes of what it means to be old. Take a look at some of the “funny” birthday cards that equate being older with being decrepit. “Caution! 60 Year Old Having a Senior Moment!” reads one. Midlife characters on TV seem terrified at the prospect of getting old and are often portrayed as sad, pathetic or laughable.

For instance, “Men of a Certain Age,” the now-canceled TNT show, featured Ray Romano and Scott Bakula as shabby, graying, skirt-chasing guys. Certainly not much for us 50-something fellows to aspire to. Then there’s this “NCIS” episode in which Special Agent Gibbs (played by Mark Harmon, 64, once People’s Sexiest Man Alive) asks a younger officer, “What’s a hashtag?” Of course we laugh condescendingly: They are old, they don’t get it, and we don’t want to be like them.

When it comes to aging, we boomers may be our own worst enemy. So many dinner conversations with mid-century friends center on one ailment or another, which can be not only boring but also indicative of a quiet acceptance that “this is the way it is now.” We have bought into the stereotype of what people our generation are supposed to walk and talk like, and all too often are willing to impose it on ourselves.

Yes, I’ve got my share of aches and pains. And I also seem to have more difficulty remembering a name or a place than I once did. On the other hand, I can swim farther and longer than ever before, I think because I have more patience and stamina now. And, as I all too frequently tell my friends, I can do a “full wheel” in yoga class, looking something like an upside-down four-legged creature, which takes a curious combination of strength, balance and focus. As a friend, I’ve lived long enough to see crises come and go, and to have a perspective that only the passage of time allows.

This is all new to me in my 50s. And I think this is where I part ways with those who think of themselves as old at my age. Age may be an incontrovertible number, but “old” seems to me to be a state of mind.

Physician Andrew Weil, author of “Healthy Aging,” summed it up recently when he offered this advice: “Consider the positives of aging, such as greater emotional equilibrium, increased wisdom and experience.” He added: “Associate with people who exemplify healthy aging.” To that I’d also suggest: Befriend younger people whose points of view will undoubtedly differ from — and enlarge — your own.

That’s not just feel-good, pie-in-the-sky crunchy-granola thinking, either.

“Studies have found that those who take in more-positive views of aging from their culture tend to lead healthier lives,” said Becca Levy, an associate professor of epidemiology and psychology at the Yale School of Public Health.

Levy and her colleagues “found that these positive views of aging predict better memory performance over time, lower risk of cardiac events and better chances of recovering from severe disabilities.”

They also live longer. Levy and colleagues also reported “that those with more-positive self-views of aging live, on average, 7.5 years longer than those with less-positive ones.” Now, that’s some science I can get behind.

I’m certainly aware of those stereotypes I mentioned earlier. They may be rooted in a kernel of truth, but it was Deepak Chopra, author of “Ageless Body, Timeless Mind,” who warned about letting “habits of perception” determine how we feel about our body and our age. Think your memory will worsen, and it will. Think you can’t do that yoga pose, and you can’t.

Think like an aging boomer, and you’ll feel like one, too. Believe that you’re old, and you are. Sure, it bothers me some when young people think folks my age are old. But, hey, what do they know? It’s when we accept that label ourselves — and the stereotypes that follow it — that we not only start to think of ourselves as old but act it, too.

Petrow writes The Post’s “Civilities” column. Follow him on Twitter @stevenpetrow.