We start with a mathematical model which describes the sliding contact of a viscoelastic body with a moving foundation. The contact is frictional and the wear of the contact surfaces is taken into account. We prove that this model leads to a differential variational inequality in which the unknowns are the displacement field and the wear function. Then, inspired by this model, we consider a general differential variational inequality in reflexive Banach spaces, governed by four parameters. We prove the unique solvability of the inequality as well as the continuous dependence of its solution with respect to the parameters. The proofs are based on arguments of monotonicity, compactness, convex analysis and lower semicontinuity. Then, we apply these abstract results to the mathematical model of contact for which we deduce the existence of a unique solution as well as the existence of optimal control for an associate optimal control problem. We also present the corresponding mechanical interpretations.