A few days before my dad died, he finally admitted he was gay.

I walked into his hospital room to find a frail man with skin as yellow as a “Simpsons” character, an effect of his failing liver, with a look of childlike fear on his face. It wasn’t death he was afraid of, at least not at that moment. My dad was terrified of how I’d react to hearing he’d been lying all along.

I’d known about his “secret” for years. As teenagers, my sister and I had even confronted him with a shoe box full of email evidence to force a confession. Armed with the emails, I’d felt like a TV lawyer setting a trap for my dad to stumble into: “On September 19, 1999, you stated that you and mom were separating because you’d simply grown apart, but that there was no infidelity involved, is that correct? I see. In that case, I’d like to introduce an email from one [name of other closeted gay family man] into evidence. As you can see by the graphic language here and here, the email clearly contradicts your aforementioned explanation …”

Denial is a powerful thing, though. Even when confronted by his own children with indisputable evidence disproving the explanation we’d been given for his leaving our mom, my dad chose to do what he’d done his entire life: He lied. My sister and I never believed his explanation (“a joke between friends that went too far”), but we never pushed the issue, either.

When I walked out of his apartment that day, my relationship with my dad was forever changed. It’s not that we had a bad relationship after the email confrontation; we just had an incomplete one. Everything was dependent upon tiptoeing around the whole gay thing.

For more than a decade, I’d assumed my dad knew I’d never believed his lame excuse for the emails but had chosen to avoid the subject at all costs, that we had an unspoken agreement not to talk about that aspect of his life. But seeing him in the hospital, I knew I’d been wrong.

Somewhere along the way, my dad had convinced himself that I didn’t know the truth. “I can’t lose you,” he’d said during our last conversation. He honestly believed that finding out he was gay would be a dealbreaker for me. As if I’d be like, “Look, I know I said I’d be your health-care power of attorney when you got this rare terminal cancer diagnosis, but that was before I found out about the whole having-sex-with-dudes thing. I’m sorry, but you’re on your own now, Pops.”

It made me furious that my dad thought so little of my capacity for tolerance and forgiveness and empathy, but something else he said in that final conversation gave me a different perspective on his life, as well as a decent helping of shame.

“I never wanted to embarrass you or your sister,” my dad said to explain the years of lying. Initially, I thought the statement was as absurd as his fear of losing me. In hindsight, however, the comment doesn’t seem so ridiculous. Hadn’t a part of me been embarrassed to find out my dad was gay? Isn’t that why I went out of my way to avoid talking about the real reason for my parents’ divorce with even my closest friends? I never would’ve admitted it at the time (and I hate myself for it now), but my dad had been justified in his fears.

At the time of my parents’ divorce, my anger wouldn’t allow me to have any compassion for my dad. Whenever I tried to see things from his perspective, all I saw was my mom after she read the emails, crumpled against my dad’s closet door, slugging the bottle of champagne she’d been saving for when they got back together. How could he do that to her? How could he do that to us?

But death has a way of making you rethink even your most fervently held beliefs. Before my dad’s death, everything was black and white. He was a liar. He was wrong. End of story. Since he’s been gone, I’ve been able to look at my dad’s life from a different point of view. For one thing, he’d been a great dad to me growing up. I always felt loved and accepted and safe, and my dad would do anything for me — anything except level with me about who he really was.

He never got that love from his own father; the dude disappeared early on, and my dad wasn’t even listed as a survivor in his obituary. Then there was his hometown, a place in Pennsylvania where the ruins of a coal mine serve as a constant reminder of the work that no longer exists. Just last year, I heard a man in Walmart use the word “faggot” as casually as I use “dude.” That was in 2017. I can’t even imagine what it was like being gay there in the ’60s and ’70s.

Like all new fathers, I’m destined to be influenced by my dad’s life, a life that in many ways was tragic and unfulfilling. But my dad’s inability to accept himself will ultimately have a positive impact on how I approach raising my own kids.

For one thing, I’ll always be hypersensitive to making sure my daughter and my son feel comfortable in their own skin. Just as important, I know I’ll never tire of teaching my children about the importance of acceptance. I can picture my annoyed teenage kids saying: “Yeah, yeah, we get it, Dad. Don’t text when you drive, and if something makes someone happy and they’re not hurting anyone, never make that person feel bad about themselves for it. Now can we please go? We’re going to be late for school.”

One of the most heartbreaking aspects of my dad’s death was where he died. Jefferson University Hospital is in Philadelphia’s famed Gayborhood, one of the most LGBT-friendly neighborhoods in any city in the nation. On his deathbed, my dad could’ve looked out the window to see street signs with rainbow flag markers and dozens of happy and free people strolling by the many trendy restaurants the area is known for.

I know the cruelty of it all wasn’t lost on him.

My dad died afraid and ashamed of who he really was. As a father, I see one of my greatest responsibilities as making sure my own children never feel that way and never contribute to making anyone else feel that way, either.

Jared Bilski is a Pennsylvania-based writer and comedian. Follow him on Twitter @JaredBilski.

Follow On Parenting on Facebook for more essays, news and updates. You can sign up here for our weekly newsletter. We tweet @On Parenting and have a Facebook discussion page about parenting and working. Join us

More reading: