The 42-year-old admits he wrote in his experiences of having to let go off his kids so they could return to their mother, reported Daily Star.
"Anybody who's divorced will tell you that the transition at the end of the summer, which, as a father, is the one time of year where you get to spend a lot of time with your kid, is very painful.
"You get confronted with the facts of your divorce. It's always a very painful moment for me. So that made it into the beginning of Before Midnight," he said.