“Baywatch” director Seth Gordon has signed on to helm the drama “Life in Rewind” for Middleton Media Group.

The film is based on Terry Weible Murphy’s book “Life in Rewind: The Story of a Young Courageous Man Who Persevered Over OCD and the Harvard Doctor Who Broke All the Rules to Help Him.”

The movie follows promising young athlete Ed Zine’s sudden descent into severe mental illness, and the Harvard doctor, Michael A. Jenike, who broke through the boundaries of traditional medicine to save him. Stephanie Shannon will write the screenplay.

The producers are John Powers Middleton and Alex Foster for Middleton Media Group, along with Rachel Winter (“Dallas Buyers Club”), Gordon, Ian Sambor, and Mary Rohlich (“Horrible Bosses”).

“This story immediately captured our hearts, and Seth’s cinematic vision for depicting the deep psychological pain of Ed Zine’s condition makes this exactly the kind of emotionally resonant story we’re excited to tell,” Middleton and Foster said in a statement.

Gordon’s directing credits include “The King of Kong: A Fistful of Quarters,” “Four Christmases,” and “Horrible Bosses.”

Winter is repped by CAA. Gordon is repped by WME, Brillstein Entertainment Partners, and Sloane, Offer, Weber & Dern. Shannon is repped by CAA, Brillstein Entertainment Partners, and Sloane, Offer, Weber & Dern. The news was first reported by Deadline Hollywood.