Show that a bounded real valued function $f:[a,b]\to\mathbb{R}$, which has countably infinite many discontinuities, is still Riemann-integrable.
I think that I have mostly understood the idea behind the proof which uses finite covers and not the notion of Lebesgue measure. However, in one step I am not sure if I can proceed as I intended to. The proof involves the construction of two sets. One set, let's call it $D$, contains the points where $f$ is not continuous and the other set, say $C$, contains all points where $f$ is continuous. I am wondering if the following definition of $C$ is legit to conduct the proof.
$$ C:=\bigcup\limits_{c\in[a,b]}U_{\delta(c)}(c)\text{, where } \\U_{\delta(c)}(c):=\{x\in[a,b]\mid|x-c|<\delta(c)\implies |f(x)-f(c)|<\frac{\epsilon}{2(b-a)}\}. $$ As $f$ is supposed to be continuous at all those points $c$, we know that all those $\delta(c)$ exist. Then we define $D$ by
$$ D:=\bigcup\limits_{k=1}^{\infty}U_{\left(\frac{1}{2}\right)^{k+m}}(d_k)\text{, where } U_{\left(\frac{1}{2}\right)^{k+m}}(d_k):=\left(d_k-\left(\frac{1}{2}\right)^{k+m},d_k+\left(\frac{1}{2}\right)^{k+m}\right)\cap[a,b], $$ where the index $m$ is chosen large enough so that the sum over all those intervals is $< \frac{\epsilon}{2 ~\underset{x\in[a,b]}{\sup} f}$. We see that $C\cup D$ is open and that $[a,b]\subseteq \left(C\cup D\right)$. So due to compactness of $[a,b]$ there exists a finite cover of $C\cup D$ which allows us to construct a partitition of $[a,b]$ and finally shows the Riemann-integrability.
My tutor told me that this definition of $C$ doesn't work but we had no time to discuss it further. I don't see where the proof would break if I use this definition of $C$?
(Please note: I am not interested in a reference of a proof of the Riemann-integrability. I just want to know if I can use the above defined set $C$ to construct a finite cover which delivers an appropriate partitition of $[a,b]$ and helps me to finish the proof.)