Aggregating in a Continuum
To obtain $\frac{\partial y}{\partial z_n}=0$, you implicitly assume that each consumer takes its own skill level as given. And in such a case, in reality the consumer optimizes with respect to labor supplied only. Perhaps it would be better to optimaze with respect to $l$ given $n$. 

Regarding aggregation the discrete analogous would not be what you write but

$$\sum_{s=0}^{\infty}p(s) T(z_s)$$

where $p(s)$ would be the proportion of the population having income $z_s$. 

Note that $y = E[T(z_s)]$, the expected value of individual tax burden w.r.t skill level. The density of $s$ plays in the continuous case the role of "population proportions" in the discrete setting