Numerical analysis of viscoelastic problems