Is vasectomy okay if it is deemed necessary for the wife's health?

I infer you mean that your wife’s getting pregnant would gravely jeopardize her health. For such a just reason, Natural Family Planning (NFP) is certainly morally permissible (see CCC 2368ff.). But a vasectomy would be morally impermissible as a “remedy,” because it would deliberately undermine the God-inscribed, unbreakable bond between the love-giving (unitive) and life-giving (procreative) aspects of the marital act. 
And as can be readily seen without invoking a religious argument, there is undoubtedly a bond between the love-giving aspect and the life-giving aspect of the marital act. The conjugal expression of a couple’s love activates and is ordered toward the possibility of procreation. Consequently, when a couple deliberately thwarts the love-giving aspect, they objectively and necessarily undermine—to one extent or another—the love-giving aspect from which it flows, because they close themselves off to a logical, fundamental, and natural fruit of the expression of their conjugal love.
NFP in such a scenario will indeed take particular discipline, but such a cross will be redemptive if we unite it with the paschal sufferings of our Lord Jesus Christ. For more information on how to practice NFP effectively, ask your pastor or diocesan family life office for NFP teaching couples in your area, or, if needed, contact the Couple to Couple League or the Pope Paul VI Institute.