The Scrubs actor shared a photo on Instagram of the duo at the vet as Roscoe licked his face.
He also posted a string of other pictures of the dog over the years, including when he was a puppy.
He wrote: “Today I had to say goodbye to my best friend, Roscoe Braff. He made it 17 years!
“I feel so lucky that we found each other. Adopt a dog. It was the best decision I ever made. Goodbye, my old friend. We’ll catch up some other time.”
Braff’s girlfriend Florence Pugh commented: “RIP to a legend. Best face kisses in town.”
The Little Women actress also shared a tribute, writing on her own Instagram page: “The coolest of cool. Goodnight sweet Roscoe. Thank you for all the love you gave and for all the kisses you treated me to.
“I genuinely count myself lucky that I got to see such a beautiful friendship between a man and his dog.
“RIP Roscoe 02/10/20.”