Can I use infinite numbers in a reduction?
A language cannot contain infinite numbers, since by definitions it is a set of finite numbers. The language itself could be infinite, though: it could contain infinitely many numbers.

In your solution, in the first case, you first enter an infinite loop and then "start accepting infinite numbers", but once you've entered an infinite loop, you're not accepting anything.

Your reduction $f$ has to satisfy the following two properties:


If $e \in L_{\mathrm{empty}}$ then $f(e) \in L_{\mathrm{inf}}$.
If $e \notin L_{\mathrm{empty}}$ then $f(e) \notin L_{\mathrm{inf}}$.


In plain English:


If $L_e$ accepts no inputs then $L_{f(e)}$ should accept infinitely many inputs.
If $L_e$ accepts at least one input then $L_{f(e)}$ should accept finitely many inputs.


Try to see if you can come up with such a function $f$. The basic idea is similar to yours - on input $n$, $f(e)$ should check whether $L_e \cap \{1,\ldots,n\} \neq \emptyset$. You should just be more careful in what happens next.