If $x_n$ is a Cauchy sequence, then uniform continuity of $f$ allows us to conclude that the sequence $f(x_n)$ is also Cauchy.
The sequences $a_n=a+\frac{1}{n}$ and $b_n =b-\frac{1}{n}$ are Cauchy, hence so are the sequences $f(a_n)$, $f(b_n)$. Since $\mathbb{R}$ is complete, these sequences converge to some numbers $f_a, f_b$ respectively. Define the function $\overline{f}:[a,b] \to \mathbb{R}$ by $\overline{f}(a) = f_a$, $\overline{f}(b) = f_b$ and $\overline{f}(x) = f(x)$ for $x \in (a,b)$. Clearly $\overline{f}$ is continuous in $(a,b)$, it only remains to show continuity at $a,b$.
Suppose $x_n\in [a,b]$, and $x_n \to a$. We have $|\overline{f}(x_n) - \overline{f}_a| \leq |\overline{f}(x_n) - \overline{f}(a_n)| + | \overline{f}(a_n) - \overline{f}_a|$. Let $\epsilon >0$, then by uniform continuity, there exists $\delta>0$ such that if $|x-y|< \delta$, with $x,y \in (a,b)$, then $|f(x)-f(y)| < \epsilon$. Choose $n$ large enough such that $|x_n-a_n| < \delta$, and $| f(a_n) - f_a| < \epsilon$. If $x_n = a$, then $|\overline{f}(x_n) - \overline{f}_a| = 0$, otherwise we have $|\overline{f}(x_n) - \overline{f}_a| \leq |f(x_n) - f(a_n)| + | f(a_n) - f_a| < 2 \epsilon$. Consequently $\overline{f}(x_n) \to \overline{f}_a$, hence $\overline{f}$ is continuous at $a$. Similarly for $b$.
For the second case, take $f(x) = \frac{1}{x-a}$. Then $f$ is continuous on $(a,b)$, but the domain cannot be extended to $[a,b]$ while keeping $f$ continuous, and $\mathbb{R}$ valued. To prove this, take the sequence $a_n$ above, then $f(a_n) = n$, and clearly $\lim_n f(a_n) = \infty$. If $f$ could be continuously extended to $\overline{f}$, then $\overline{f}(a) \in \mathbb{R}$, which would be a contradiction.
For the first part, we fix $\epsilon > 0$, and choose $\delta > 0$ so that $|x - y| < \delta \implies |f(x) - f(y)| < \frac{\epsilon}{2}$. Let $N \in \mathbb{Z}^+$ so that $\frac{1}{N} < \delta$, and partition $[0,1]$ to $\left[0,\frac{1}{N}\right] \cup \left[\frac{1}{N},\frac{2}{N}\right] \cup \cdots \cup \left[\frac{N-1}{N},1\right]$. Since $\lim_{n \to \infty} f(n + x) = 0$ $\forall x \in [0,1]$, or each $\frac{k}{N}$, there exists an $M_k \in \mathbb{Z}^+$ large enough so that:
$$
x \in \left\{M_k + \frac{k}{N}, (M_k + 1) + \frac{k}{N}, \dots\right\} \implies |f(x)| < \frac{\epsilon}{2}
$$
We let $M = \max\{M_0,M_1,\dots,M_N\}$. Now for any $x > M$, we have $x \in \left(T + \frac{k}{N}, T + \frac{k+1}{N}\right)$ for some $T \in \mathbb{Z}^+, T \geq M$. Then:
$$
|f(x)| \leq \left|f(x) - f\left(T + \frac{k}{N}\right)\right| + \left|f\left(T + \frac{k}{N}\right)\right| < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon
$$
Since $\epsilon$ is arbitrary, we have $\lim_{x \to \infty} f(x) = 0$.
This statement does not hold if we simply let $f$ be continuous. I'll adopt the counterexample posted here:
$$
f(x) = \begin{cases}
2n\left(x - \left(n - \frac{1}{n}\right)\right), &\text{if $x \in \left[n - \frac{1}{n},n - \frac{1}{2n}\right]$ for some $n \in \mathbb{Z}^+$} \\
-2n(x - n), &\text{if $x \in \left[n - \frac{1}{2n},n\right]$ for some $n \in \mathbb{Z}^+$} \\
0, &\text{otherwise}
\end{cases}
$$
As the OP of the original answer said, this function is zero everywhere except on all intervals in the form of $\left[n - \frac{1}{n}, n\right]$, where there is an isosceles triangle of height $1$ (so the "tip" of the triangle is on every $x = n - \frac{1}{2n}$). Then for any $x \in [0, 1]$, we have $\lim_{n \to \infty} f(n + x) = 0$, as for sufficiently large $n$ we have $x < 1 - \frac{1}{n + 1}$, so $n + x < n + 1 - \frac{1}{n + 1}$. Visually, this means that the points $n + x$ lie strictly on the left of the isosceles triangles on intervals $\left[n - \frac{1}{n}, n\right]$, so $f(n + x)$ becomes $0$ eventually. However, it is not true that $\lim_{x \to \infty} f(x) = 0$, as if we take the sequence of points $x_n = n - \frac{1}{2n}$, we have $x_n \to \infty$ yet $f(x_n) = 1$ $\forall n$ (recall that $\lim_{x \to \infty} f(x) = 0$ iff for any sequence of points $(x_n)$ such that $x_n \to \infty$, we have $f(x_n) \to 0$).
EDIT: With regards to the added specification, your explanation is actually pretty good and reflects well on what is happening here in the problem. In order for $\lim_{x \to \infty} f(x) = 0$, we need to have $f(x_n) \to 0$ for any sequence $(x_n)$ such that $x_n \to \infty$. The information given, $\lim_{n \to \infty} f(n + x) = 0$ $\forall x \in [0, 1]$, only guarantees that $f(x_n) \to 0$ for sequences $(x_n)$ which increases linearly (i.e. $x_m - x_n \in \mathbb{Z}$ $\forall m,n \in \mathbb{Z}^+$). This does not tell us about the behaviour of $f$ for sequences which do not increase linearly. This explains why the counterexample works - the sequence $x_n = n - \frac{1}{2n}$ does not increase linearly anywhere.
However, the condition which $f$ is uniformly continuous tells us that we can approximate the behaviour of $f(x_n)$, where $x_n$ increases non-linearly, with linear sequences near it (by near, I mean $x \in \left(T + \frac{k}{N}, T + \frac{k+1}{N}\right)$). This allows us to ensure that the behaviour of $f(x)$ as $x \to \infty$ can be controlled entirely by linearly increasing sequences, which is why we can conclude $\lim_{x \to \infty} f(x) = 0$.
Best Answer
Let $L=lim_{x\rightarrow +\infty}f(x), L'=lim_{x\rightarrow -\infty}f(x)$, for every $c>0$, there exists $M>0$ such that $x>M$ implies that $|f(x)-L|<c/4, x<-M$ implies that $|f(x)-L'|<c/4$.
The function is uniformly continuous on $[-3M,3M]$ since $[-3M,3M]$ is compact, there exists $e$ such that for every $x,y\in [-3M,3M], |x-y|<e$ implies that $|f(x)-f(y)|<c$.
Let $d=\inf(e,M)$. Consider $x,y\in \mathbb{R}$, such that $|x-y|<d$, if $x,y\in [-M,M]\subset [-3M,3M], |x-y|<e$ and $|f(x)-f(y)|<c$. If $x,y>M$ or $x,y<-M$, $|f(x)-f(y)|<c$.
Suppose that $x\in [-M,M]$ since $|x-y|<M, |y|<|x|+|M|=2M$, and $|x-y|<3M$, we deduce that $|f(x)-f(y)|<e$.