In terms of the sacramental ministry of the priest, the Church teaches that it is the priesthood of Christ and not the priest himself who is acting. That is to say, the effectiveness of the sacraments are not dependent on the state of the priest preforming them. So if you have a priest who has lost faith and you go to communion, have your baby baptized, or any other sacrament from him, they will all be valid and good (so long as he has proper matter and form).
As for the pastoral duties of a priest, I don't see how he would be able to wholly separate his personal feelings. I would think that his heart would just not be in it and that would be reflected in his preaching and care for his people.
So on a sacramental level there would not be a problem in continuing ministry. On a pastoral level there might be problems. I would say that much of that would depend on the exact nature of their unbelief. There are a lot of priest who do not agree with the Church on one teaching or another. As a priest and spokesperson for the Church the must represent the official teachings, and that is sometimes difficult when they feel the Church is wrong. So it is possible to have some lack of faith or belief and still preach and teach. I think it would be difficult and some priests might choose to step aside and perhaps some may need to be asked to step aside if they are negatively effecting the faith of their flock. Maybe their faith can be recovered, maybe they are just going through a bad time.