This is more of an interesting one, and I was hoping on your help.
It is a well-known fact that changing the value of a Riemann-integrable function in finitely many points (i.e. introducing finitely many removable discontinuities) leaves the function integrable, and actually with the same value. This is trivial from the definition of integral.
Now, say you have infinitely many removable discontinuities. If they are well-spaced (i.e. exists a lower bound inf>0 for the set of distances between the discontinuity points), because of the additivity of integrals you can isolate each one of them, and you are basically done.
But then there is the pathological case. What happens when you have an integrable function (let's say, for the sake of the argument, a continuous one. Make it constant too!) where infinitely many removable discontinuities have been introduced in a way such that the distance between them does not have a lower bound? NOTE: In the process of doing so, you could actually introduce second-type discontinuities (non-existence) too. That is not the problem here. You can either decide to consider them, or consider improper integrals where those points have been ignored.
I cannot figure out whether it will still be integrable or not, and how to prove it generally. I would really appreciate your help. Thank you.
Below follows my solution for a particular case.
When discontinuity get closer as they approach a certain point
ACHTUNG: PARTIAL SOLUTION
Let's explain the general approach through an example. When you have a function such as \begin{equation} f(x)= \begin{cases} 0 \qquad if \ \sin(\frac{1}{x})=0 \\ 1 \qquad elsewhere \end{cases} \end{equation} Where $1$ was continuous, and where I have introduced infinitely many discontinuities around $0$, and they get closer as they approach $0$.
Then, if I want the integral, let's say, between $1$ and $0$, I will use the fact that the function is trivially locally integrable. Thus i will break apart the limit by additivity $$ \int^1_0f(x)\:\mathrm{d}x=\int^1_mf(x)\:\mathrm{d}x+\int^m_0f(x)\:\mathrm{d}x=\int^1_mg(x)\:\mathrm{d}x+\int^m_0f(x)\:\mathrm{d}x $$ Where $g(x)$ is the constant function $g(x)=1$. Indeed, now the $f(x)$ has finitely many discontinuities and its integral is thus equal to that of $g(x)$.
Now, bring m to the limit and upper-bound the pathological right integral with $(m-0)\sup f(x)$. $$ \lim\limits_{m\to0}\int^1_0f(x)\:\mathrm{d}x\leq\lim\limits_{m\to0}\int^1_mg(x)\:\mathrm{d}x+m\sup f(x)=\int^1_0g(x)\:\mathrm{d}x $$ Thus, in this specific case, the function is integrable and the integral value must be the one that the constant function $g=1$ had in the same interval.