Just treat it as continuous. With a million baseballs, it’ll be very close to the same answer.
You haven’t said how many baseballs/second you’re shooting out. I’ll assume 1 baseball/sec.
Ship mass m(t) = (157000 - 0.145t). Force is 145 N (0.145 kg * 1000 m/s / 1 s). Therefore, a(t) = (157000 - 0.145t) / 145.
To get the total delta V, just use the Tsiolkovsky rocket equation. Fairly easy to derive (I did so here), but just using an online calculator is more convenient. Plug in the numbers and get 2571.3 m/s. Note that this is independent of thrust (i.e., balls/sec).
You could maintain constant acceleration (or any other function) by varying the rate at which you shoot out balls, but it won’t change the delta V.