The best numerical criterion of contrability for curves on surfaces is perhaps the following result, due to Michael Artin.
Proposition. Let $V$ be a surface and $X=\bigcup X_i \subset X$ be a connected curve. Then the following are equivalent:
$\boldsymbol{(i)}$ $X$ is contractible and if $\pi \colon V \to \bar{V}$ is the contraction map, then $\chi(\mathcal{O}_V) = \chi(\mathcal{O}_{\bar{V}})$;
$\boldsymbol{(ii)}$ the intersection matrix $|(x_i \cdot x_j)|$$|(X_i \cdot X_j)|$ is negative definite and for any cycle $Z$ supported in $X$ one has $p_a(Z) \leq 0$.
Moreover, under these conditions, if $V$ is a normal projective surface then $\bar{V}$ is also projective.
In other words, if $V$ is normal, projective and $X$ is "sufficiently rational and negative", then $X$ is contractible and the contraction is algebraic. For further detais, see
M. Artin: Some Numerical Criteria for Contractability of Curves on Algebraic Surfaces,American Journal of Mathematics Vol. 84, No. 3 (Jul., 1962), pp. 485-496,
in particular Theorem 2.3 p. 491.