Note that $h\colon \mathbb C\to\mathbb C$, $z\mapsto\begin{cases}0&\text{if }|z|\le \varepsilon\\\frac{|z|-\varepsilon}{|z|}\cdot z&\text{if }|z|\ge\varepsilon\end{cases} $ is continuous. Then $g=h\circ f$ seems to do what you want, i.e., the support of $g$ is the compact set $F$ and $|f-g|\le \varepsilon$. If desired, one can deform $h$ suitably so that $h(z)=z$ for $|z|>\delta>\epsilon$, thus making $f$ "more equal" to $g$.
You're correct in principle. Note that your question is vacuous without stating an ambient space. I'm assuming that for uniform convergence, our ambient space is the space of bounded functions and for uniform convergence on compacta (or local uniform convergence as I prefer to call it), that the ambient space is the space of locally bounded functions.
Denote by $\|\cdot \|_{\infty}$ the uniform norm and by $\|\cdot\|_{\infty, N}$ the semi-norm induced by the uniform norm on $C(B[0,N])$ . Then, the $f_m\to f$ uniformly if and only if $\|f_m-f\|_{\infty}\to 0,$ whereas $f_m\to f$ locally uniformly if and only if $\|f_m-f\|_{\infty,N}\to 0$ for every $N$.
Furthermore, I'll suppress $\mathbb{R}^n$ from my notation and e.g. write $C$, $C_c$ and $C_0$ for the function spaces in question.
Let's first show that $C_c$ is dense in $C_0$ w.r.t. to $\|\cdot \|_{\infty}$. So let $f\in C_0$ and let $\xi_N$ be a continuous function such that $0\leq \xi_N(x)\leq 1$ for every $x$, $\xi_N\equiv 1$ on $B[0,1]$ and $\xi_{N}\equiv 0$ on $\mathbb{R}^n \setminus B[0,N+1]$. Then, $\xi_Nf\in C_c$ and
$$
\|\xi_Nf-f\|_{\infty}\leq \| 1_{\{|x|\geq N\}} f\|_{\infty},
$$
which goes to $0$, since $f\in C_0(\mathbb{R})$.
Now, we need to show that $C_0$ is a closed subset of the bounded functions in the topology of uniform convergence. Indeed, if $f_m\in C_0$ for every $m$ and $f_m\to f$ uniformly, then $f$ is, necessarily, continuous. Furthermore, given $\varepsilon>0$, pick $m$ so large that $\|f_m -f\|_{\infty}<\varepsilon/2$ and $N$ so large that $|f_m(x)|<\varepsilon/2$ whenever $\|x\|\geq N$. Then, for $\|x\|\geq N,$ we get
$$
|f(x)|\leq |f(x)-f_m(x)|+|f_m(x)|<\frac{\varepsilon}{2}+\|f-f_m\|_{\infty}<\varepsilon,
$$
implying that $f$ tends to $0$ as $\|x\|\to \infty$. Hence, $C_0$ is closed, and we get that the closure of $C_c$ is $C_0$.
Let's now show that $C_c$ is locally uniformly dense in $C$. Let $f$ be continuous and note that $\|\xi_N f-f\|_{\infty,M}=0$ for $M\geq N$, establishing that $\xi_Nf\to f$ locally uniformly. I'm assuming that you know that $C$ is closed in the space of locally bounded functions (e.g. that locally uniform limits of sequences of continuous functions are again continuous). Hence, the locally uniform closure of $C_c$ is $C$.
Best Answer
You don't really need $g=f$ on $K$. Postcompose $f$ with a function sending small values to zero. For example define $$m_\epsilon(x)=\begin{cases}x-\epsilon&\text{ if $x\geq \epsilon$}\\ x+\epsilon&\text{ if $x\leq -\epsilon$}\\ 0&\text{ otherwise}\end{cases}$$ Then consider $g=m_\epsilon\circ f$.