If I am reading this correctly the set D has only a finite number of elements in it. So try a easier problem first. What if f is bounded and is only discontinuous at one point c in [a,b]. How could you create a partition that that would show f is integrable. If you can solve this problem it will generalize to any finite set of points of discontinuity.
Hint: squeeze the one point of discontinuity into a set of length then the function is continuous on and