Wicks, who was made an MBE last year, endeared himself to the nation by giving free online fitness classes during the coronavirus lockdown.
He said he wanted to “connect and help families today who are in similar situations to the one I was in”.
Theroux said it was a “dream project”.
Wicks said he hoped the documentary would help show exercise was a “powerful tool in helping to boost our mental health”.
“I’ve spent a lot of time helping people improve their physical health,” he added. “But as a child that grew up in a home with parents that struggled with their mental health, I know that this is just as important, especially given what’s happened over the last year.
Like many people who attended The Body Coach’s virtual HIIT classes during the pandemic, Theroux said they had been good for his mental and physical health.
“In this intimate and emotionally powerful film Joe will revisit his childhood and have frank discussions with his family and friends, revealing how his experiences motivated him to keep healthy.”
Theroux, a two-time Bafta winner who famously interviewed Jimmy Savile in 2000, said he was one of the thousands to watch Wicks’ online workout videos and was “a true believer in Joe’s mission of improving your mental well-being through exercise”.
“It is a complete thrill and privilege to be able to spread the word further in this documentary, while also showing a side of the nation’s favourite PE teacher they have never seen before,” he said. The documentary will be called Joe Wicks: Mental Health, My Family And Me.