I googled away to glory and maybe this will help:
Darboux theory
EDIT: Can the experienced answerers shed light on this problem?
There's a really handy theorem in my book that says that "if a function has finitely many points of discontinuity, then it is Riemann-integrable". That's very nice for this problem, because if , then
Calculate the lower Riemann sum of . Let be a partition of and let be the segment containing . on , because it contains a point that is not , so therefore the lower Riemann sum and the whole integral is zero.
We can prove something stronger. If is integrable and is a function that differs at countably many points distinct from such that they converge then is integrable with same value as . The nice thing is that the proof is similar as in the finite case. Because when you have convergence it means that within a a small enough neighborhood of the limit all the points lie there. So you form a partition with thin enough rectangles around these values.