We consider a linear damped wave equation defined on a two-dimensional domain Ω, with a dissipative term localized in a subset ω. We address the shape design problem which consists in optimizing the shape of ω in order to minimize the energy of the system at a given time T . By introducing an adjoint problem, we first obtain explicitly the (shape) derivative of the energy at time T with respect to the variation in ω. Expressed as a boundary integral on ∂ω, this derivative is then used as an advection velocity in a Hamilton-Jacobi equation for shape changes. We use the level-set methodology on a fixed working Eulerian mesh as well as the notion of the topological derivative. We also consider optimization with respect to the value of the damping parameter. The numerical approximation is presented in detail and several numerical experiments are performed which relate the over-damping phenomenon to the well-posedness of the problem.