Is there a comic line where Harvey Dent is allowed to be happy
Yes, actually! Well, sorta. It depends on what you mean by "comic line."
The very first version of him, the Golden Age Harvey Kent, got to keep his happy ending from the original Two-Face trilogy and marry Gilda. Their only other appearance was in Superman Family #211 where they were seen in attendance of Bruce and Selina's wedding:
Of course, given that this was Earth-Two, this meant that they along with their entire universe, died in Crisis on Infinite Earths. Not just died, but were so obliterated that they never truly existed. So that's a downer. But hey! At least until some writer comes along to remember them again. Still, they presumably got to live a long, happy life together, which is far more than Harvey gets the vast majority of the time!
Then of course there's the universe of the 1989-1991 newspaper comic strips, which (spoiler alert!) ends very happily for Harvey. The strip was being cancelled anyway, so it's wonderful that writer William Messner-Loebs decided to end it with a celebration for Harvey's recovery.
The other one that comes to mind is the DC Bombshells comic series, where Harvey was the mayor and brainwashed by Hugo Strange into going after superheroes. After getting burned, he's rescued and adopted by the teenage group of Batgirls.
This is the only time Harvey has ever been officially considered a member of at least ONE form of BatFam. He then became their butler. It's cute but weird.
Aside from these, there're also a couple Elseworlds books where Harvey's life doesn't end in misery or death, notably Batman: Two Faces and Gotham Noir, but I wouldn't say he's exactly HAPPY in those. He's just better off than the usual Harveys.
Ultimately, the problem with even these stories is we never actually get to see any more of him doing stuff. No one has ever really tried exploring the potential of what a post-redemption Harvey Dent could bring to Batman. But given how much misery Gotham characters go through, perhaps the only way to ensure him being happy is to let those Harvey's go off to limbo where they can't be hurt anymore.
I know I poke fun at the john constantine pink triangle incident but jokes aside i'm genuinely curious what other people think about it. imo it's a great blaring example of how incapable dc is at writing john's bisexuality into a story that doesn't surround corporate pride or getting together with a man.
I tried talking about it once on tiktok (idk what i was thinking either) and a few people defended it saying things like "how else would you explain a blond hair blue eyed man being sent to a ww2 ghetto?"
didn't the joker send him there? was that not reason enough? 'the joker' was kidnapping girls and ordering soldiers around, we can't suspend our belief that she had the power to send a british soldier caught undercover as a nazi away? the pink triangle and 'bunny that doesn't breed' comment was necessary to the plot?
"I listen to the sound of bells... to water, air, and light... The laughter of the children playing down below--alive, and happy, and free. And it's then that, for the first time, I don't grieve for our son. He is here with us. He is here with the birds, and the boys, and the freedom he bought with his choice, his love, his sacrifice. I remember our son and that last thing he asked, that last question... Where do the birds go when it rains? Where do the birds go when it rains... They take shelter. And when the rain have passed... they take flight."