Art imitated life for Will Smith when it came to making Collateral Beauty, a movie that explores how the deepest of losses can reveal moments of wonder.

Smith plays Howard, a New York advertising executive whose perfect life is shattered by the death of his 6-year-old daughter. While Smith was working on the film, his own father was diagnosed with terminal cancer.

"I had this screenplay and I'm doing all this research about a guy who experiences death. At the time, my father was given six weeks," Smith told Ellen DeGeneres on her Thursday talk show. The film opens in U.S. movie theaters Dec. 16.

"So, you know, the performance for me and the movie for me and the ideas are so deeply personal," he added. Smith's father, Willard Carroll Smith, lived longer than expected but died in November.

Smith heads an ensemble cast that includes Helen Mirren, Keira Knightley, Edward Norton and Naomie Harris, all of whom try to get through to Howard using unorthodox methods.

"Our biggest challenge in terms of making the movie was trying to find the right balance, you know, the right tone between humor and drama. I call it a screwball drama because it's this wacky story with these very dramatic moments," director David Frankel told Reuters.

Mirren said the Collateral Beauty story was unlike anything she had seen before.

"The way in which the story was told was unexpected. The form of it was unexpected. And I thought this could either be kind of cool and kind of good or it could be an absolute disaster," Mirren told Reuters.

She said the movie touched on the "reality that in the darkest and most difficult of moments there ... can be great beauty, and it's one of the great miracles of life."

Smith told DeGeneres he hoped the movie would help others get through difficult times, just as it had helped him.

"I hope you love it. And anybody who needs it, I hope it really is able to do for you what it has for my father and I," he said.