We derive optimal complex damping parameters minimizing smoothing factors associated with multigrid using red-black successive over-relaxation or damped Jacobi smoothing applied to a class of linear systems arising from discretized linear partial differential equations with a complex shift. Our analysis yields analytical formulas for smoothing factors as a function of the complex damping parameter, which may then be efficiently numerically minimized. Our results are applicable to second-order discretizations in arbitrary dimensions, and generalize earlier work of Irad Yavneh on optimal damping parameters in the real case. Our analysis is based on deriving a novel connection between the performance of SOR as a smoother and as a solver, and is validated by numerical experiments on problems in two and three spatial dimensions, using both vertex- and cell-centered multigrid, with both constant and variable coefficients. In the variable coefficient case we assign different damping parameters to different grids points, which our framework allows us to do efficiently.