Now suppose that g(t) is continuous for t in [a,b]. Then it is uniformly continuous, so that last integral will be close to what it would be with g(u) in place of (provided that is large). Also, the difference caused by shifting the limits of integration back to a and b will not affect the integral much. Thus if is small then so is .
Converting that vague talk about things being small into a precise argument with epsilons will be messy but not inherently difficult. (In practice, however, I think it would be easier to repeat the proof of the sine result, replacing sines by cosines, rather than trying to deduce one result from the other.)
If you only know that g is piecewise continuous (that is, continuous except for a finite number of jump discontinuities) then you can split the interval [a,b] into a finite number of subintervals on which g is continuous, and apply the above argument to each of them.