According to TV Line, the 32-year-old actor is taking the Andrea Zuckerman route and will appear in "roughly five episodes" as a guest star in the fall.
"I look back on getting this real-life story line as a blessing," Donovan said in a statement to TV Line. "To be able to simultaneously take on a challenging role and bring awareness to a relevant social issue was a win-win for me. I'm looking forward to what opportunities and adventures lie ahead."
Changes were inevitable for the West Beverly gang, who graduated from high school in the season 3 finale and are now heading to college. Already axed from the series are Lori Loughlin and Ryan Eggold, the show's lone adult figures.
Lesson learned: No one over 30 is safe. Watch your back, Michael Steger ...
Tell us: Will you miss Teddy on '90210' in the fall?
Follow Jean on Twitter @hijean