Sometimes features can have 0s and missing values. For example, maybe you measure the strike-outs per game per pitcher for a set of baseball pitchers, and you end up with a feature vector like
feats <- c(NA, NA, NA, 3.7, 0, 2.2)
sparse1 <- sparseMatrix(i=4:6, j=rep(1, 3), x=c(3.7, 0, 2.2), dims=c(6, 1))
To answer the exact question though:
yes, a missing value is not considered for the gain computation (does not add to the sum of gradient and hessian of the children in a boosting tree) while a 0 value is considered (and adds to the sum of gradient and hessian of the children in a boosting tree)
So, a 0 and a missing value is not the same.