delete some vertex points from image

I plotted a function using OpenGL, the problem now is with discountinous functions.

A function in 3D such as 1/x is discountinous at 0, but the graph joins the points across the discontinuity.

I can identify these points and if I was using immediate mode just not render those vertices, but I used vertex arrays, so how would I about deleting a set of points this way?

I thought just to colour them same as the background so they don´t show up, but I used a 1D texture for the colours, any suggestions on how this could be done?

Thanks.

If you could skip the values in immediate mode, can you skip them when filling the vertex array?
Or you could use an index array to select a subset of the vertices in your vertex array.