"I think it's made me who I am today," says Dempsey, who plays neurosurgeon Dr. Derek Shepherd on the hit ABC series, in an interview on "The Barbara Walters Special" that airs Wednesday night (10 p.m. EST).
"It's given me a perspective of — you have to keep working," Dempsey tells Walters. "I have never given up."
Dempsey, 40, says he struggles while reading scripts and memorizing his lines.
"I think that's when I get the most insecure ... it's very hard for me to read it off the page," he says. "I need to memorize it, in order to go on."
Dempsey, now experiencing a career comeback since dropping off Hollywood's radar screen after his '80s romantic comedy days, says he was once prone to divalike behavior.
"You can't have temper tantrums," he says. "You have to be professional and I don't think I understood that at the time."
On "Grey's Anatomy," Dempsey's character is nicknamed "Dr. McDreamy" by the hospital's female interns, including Dr. Meredith Grey, played by Ellen Pompeo.
Walters also interviews Matthew McConaughey, George Clooney, an Oscar nominee in multiple categories, and Mariah Carey, on the 25th edition of her Oscar special.
The show, which previously aired before the Oscars show on the East Coast and immediately following the show on the West Coast, was moved back this year to the last night of sweeps and following an original episode of "Lost."
The Oscars will air Sunday on ABC (8 p.m. EST).