Extension of morphisms on surfaces Consider two regular integral proper algebraic surfaces $X$ and $Y$ over a DVR $\mathcal O_K$ with residue field $k$. Let $U \subset X$ be an open subset, s.t. $X\setminus U$ consists of finitely many closed points lying in the closed fiber $X_k$. Assume that all points in $X\setminus U$ considered as points in $X_k$ are regular. Consider now an $\mathcal O_K$-morphism $f: U \to Y$. 

Is there any extension of $f$ to $X$?

I know that $Y_k$ is proper. Since every $x \in U_k$ is regular, $\mathcal O_{X_k,x}$ is a DVR, therefore by the valuative criterion of properness 
$$
  Hom_k(U_k,Y_k) \cong Hom_k(X_k,Y_k),
$$
so $f_k$ can be uniquely extended to $X_k$. Thus, set-theoretically an extension of $f$ exists.
On the other hand, if there is an extension of $f$ to $X$, then on the closed fiber it coincides with $f_k$. Unfortunately, I don't see, how to construct such an extension scheme-theoretically. 
Motivation
Consider a subset $\mathcal C$ of the set of irreducible components of $Y_k$. Assume that the contraction morphism $g: Y \to X$ of $\mathcal C$ exists, i.e. $X$ is proper over $\mathcal O_K$, $g$ is birational and $g(C)$ is a points if and only if $C \in \mathcal C$. Since $g$ is birational we have a section $f: U \to Y$ of $g$ over an open $U \subset X$. In fact, $X\setminus U = f(\mathcal C)$. If we now assume that all $x \in X\setminus U$ are regular as points in $X_k$, we will obtain the above situation.

Suppose $f : U\to Y$ is dominante. Then $f$ extends to $X$ if and only if $Y\setminus f(U)$ is finite. In particular, in your situation, $f$ extends to $X$ only when $g$ is an isomorphism (no component is contracted). 
One direction (the one that matters for you) is rather easy: suppose $f$ extends to $f' : X\to Y$. As $X$ is proper, $f'(X)$ is closed and dense in $Y$, so $f'(X)=Y$ and $Y\setminus f(U)\subset f(X\setminus U)$ is finite. 
For the other direction, consider the graph $\Gamma\subset X\times_{O_K} Y$ of the rational map $f : X - -\to Y$. Let $p: \Gamma\to X$ be the first projection. Then $\Gamma\setminus p^{-1}(U)$ is contained in the finite set $(X\setminus U)\times (Y\setminus f(U))$. This implies that $p$ is quasi-finite. As $p : \Gamma\to X$ is birational and proper (thus finite), and $X$ is normal, this implies that $p$ is an isomorphism. So $f$ extends to $X$ via the $p^{-1}$ and the second projection $\Gamma\to Y$.
