The following approach avoids the overflow by subtracting the exponents and then taking the exponential, instead of dividing the exponentials:
res = 1./sum(exp(bsxfun(@minus, V(:), V(:).')))
As a general rule, overflow can be avoided by working in the log domain for as long as possible, and taking the exponential only at the end.