Substitute a function

In the following code, I’m trying to substitute Sin[x] for f[x]. What’s the right way to do it so that f'[x] gets replaced with Cos[x]?

e = f[x] + f'[x]
e /. f[x] -> Sin[x]