Gravitational waves are considered as metric perturbations about a curved background metric, rather than the flat Minkowski metric since several situations of physical interest can be discussed by this generalization. In this case, when the de Donder gauge is imposed, its preservation under infinitesimal spacetime diffeomorphisms is guaranteed if and only if the associated covector is ruled by a second-order hyperbolic operator which is the classical counterpart of the ghost operator in quantum gravity. In such a wave equation, the Ricci term has opposite sign with respect to the wave equation for Maxwell theory in the Lorenz gauge. We are, nevertheless, able to relate the solutions of the two problems, and the algorithm is applied to the case when the curved background geometry is the de Sitter spacetime. Such vector wave equations are studied in two different ways: i) an integral representation, ii) through a solution by factorization of the hyperbolic equation. The latter method is extended to the wave equation of metric perturbations in the de Sitter spacetime. This approach is a step towards a general discussion of gravitational waves in the de Sitter spacetime and might assume relevance in cosmology in order to study the stochastic background emerging from inflation.