Reconciling dark energy models with f(R) theories