I would say no, because for $ x <0 $, $ f (x) rightarrow infty $ as $ n rightarrow infty $ since $ e ^ {- nx} rightarrow infty $ as $ n rightarrow infty $. So the series does not even converge for $ x <0 $.

Also $ f (0) = sum limits_ {n = 1} ^ { infty} – frac {1} {n} cos (1) $ which would seem to diverge for $ – infty $.

Correct?