This paper considers the analysis of structures with nonlocal damping, where the reaction force at any point is obtained as a weighted average of state variables over a spatial domain. The model yields an integro-differential equation, and obtaining closed form solutions is only possible for a limited range of boundary conditions by the transfer function method. Approximate solutions using the Galerkin method for beams are presented for typical spatial kernel functions, for a nonlocal viscoelastic foundation model. This requires the approximation of the displacement to be defined over the whole domain. To treat more complicated problems with variable damping parameters, non-uniform section properties, intermediate supports or arbitrary boundary conditions, a finite element method for beams is developed. However, in nonlocal damping models, nodes remote from the element do have an effect on the energy expressions. and hence the damping matrix is no longer block diagonal. The expressions for these direct and cross damping matrices are obtained for separable spatial kernel functions. The approach is demonstrated on a range of examples.