The completion of a ring with respect to a maximal ideal is always local.
Proof: If $x \in \hat{R}$, then we may write $x = \sum_{i=0}^{\infty} x_i,$ where $x_i \in \mathfrak m^i$. If $x_0 \not\in m,$ then I claim that $x$ is a unit.
Indeed, in this case we may find $y \in R$ such that $x_0 y \equiv 1 \mod m,$
and so $xy = 1 + (x_1y + x_0y - 1) + \sum_{i = 2}^{\infty} x_iy,$ and so it suffices
to show that $\sum_{i=0}^{\infty} x_i$ is a unit under the additional assumption that $x_0 = 1$. But then we can construct an explicit inverse for $x$ using the formula for a geometric series: $x^{-1} = 1 + (x_1 + x_2 + \cdots) + (x_1 + x_2 + \cdots )^2 + \cdots.$
Thus the kernel of the map $x \mapsto x_0 \bmod m$ (i.e. the kernel of the natural projection $\hat{R} \to R/m$) has the property that its complement consists of units, and so it must be the unique maximal ideal of $\hat{R}$,
and so $\hat{R}$ is local. This completes the proof.
In general, if $R$ is a noetherian ring and $\mathfrak m$ a maximal ideal of $R$, then $\hat R$ (the $\mathfrak m$-adic completion of $R$) is a noetherian local ring.
Write $\mathfrak m=(a_1,\dots,a_n)$. Then $\hat R\simeq R[[X_1,\dots,X_n]]/(X_1-a_1,\dots,X_n-a_n)$. A maximal ideal of $R[[X_1,\dots,X_n]]$ has the form $M=\mathfrak n R[[X_1,\dots,X_n]]+(X_1,\dots,X_n)$ with $\mathfrak n\subset R$ a maximal ideal. Since $(X_1-a_1,\dots,X_n-a_n)\subseteq M$ we must have $a_i\in\mathfrak n$ for all $i$, that is, $\mathfrak m=\mathfrak n$. As a consequence we get that $M=\mathfrak m R[[X_1,\dots,X_n]]+(X_1,\dots,X_n)$ and this is the only maximal ideal of $R[[X_1,\dots,X_n]]$ containing $(X_1-a_1,\dots,X_n-a_n)$.
Added in proof. I've found here on page $6$ a more general result: the $I$-adic completion $\hat R$ is quasi-local iff $R/I$ is quasi-local. (Quasi-local means local, but not necessarily noetherian.) In the noetherian case the proof goes exactly as I did before.
Best Answer
The completed local ring depends on information which is a lot more "local" than what the Zariski topology sees. For instance, for any smooth point $x$ in a variety $X$ with $\dim_x X = n$, the completed local ring will just be $K[[x_1,\cdots,x_n]]$. So the only chance of nontrivial $f$ would be if the point were singular. Even here, the completed local ring doesn't see much global information.
Consider the following two examples: $V(xy)$ and $V(y^2=x^2(x^2-1)(x-2))$ both as subschemes of $\Bbb A^2_K$. It can be computed that the completed local ring at the origin of both of these is $K[[x,y]]/(xy)$, but there's no isomorphism between any open sets of the two varieties - up to shrinking the open set in $V(xy)$ so that it is only contained in one of the irreducible components, this would correspond to a birational map between curves of different genus, which is clearly nonsense.