12:34 PM PT -- TMZ spoke to one of the unsung heroes of this story -- Helen Pitts of Los Angeles Petfinders -- who tells us she helped connect Rob with Chance's family after seeing their missing dog post ... and putting 2 and 2 together with Rob's social media posts.
Helen says Chance had ear infections and suffered burns to his paws from running on the hot asphalt, but he's healing great and is now microchipped.
We're told Petfinders has helped reunite about 5,000 lost pets with their owners.
Rob McElhenney's tale of rescuing a dog and reuniting him with his loving family will help you through ruff times ... especially when you see the pup's tail.
The "It's Always Sunny in Philadelphia" star says he and his wife -- and 'Sunny' costar -- Kaitlin Olson, stopped traffic on an L.A. freeway when they saw the "handsome motherf**ker" running alone.
After they got the dog -- which looks like a Pit Bull mix -- in their car with the help of another good Samaritan named Bridget, Rob and Kaitlin took him to a vet ... where they learned he wasn't chipped, but he was assigned the name "Brad Pitt" because he's "so damn beautiful."
Rob chronicled Pitt's story on IG, and it gets so much better. He says they decided to rename the pup, Frank Reynolds because of his body type -- an 'Always Sunny' jab at Danny DeVito's character. Then they learned the dog's loving owners were desperately searching for him, and they also learned his real name ... Chance!
Rob says they spoke to the family on the phone and they were crying with joy, and soon after they brought Chance home for the happiest of endings.
As McElhenney puts it ... "Social media may be ripping apart the fabric of our society but ... Sometimes it's pretty great."
The end.
Originally Published -- 9:01 AM PT