This question already has an answer here:
Map $\mathbb{Z}$ bijectively to $\{…,-3,-2,-1,0\}$ and leave the other points from $\mathbb{R}$ untouched.
Hint: do you know how to build a bijection $[0,1]\to (0,1]$? You “hide” $0$ somewhere inside an interval (in some infinite sequence). In your case you can hide all positive integers in some sequence too.
Update: you can choose any sequence $\{a_i\}$ and for all $n\in\mathbb{N} \quad f(n) = a_{2n},$ for elements from sequence $f(a_i) = a_{2i+1},$ and otherwise $f(x) = x$.