You're having a bit of trouble with the energy concept I think.
The energy is not infinite, it's given by half of the mass of the ball times the square of it's velocity.
If the velocity and mass stay the same so does the energy, the energy is only lost when a force like friction acts on it and it starts to slow - then the velocity drops and so does the energy.
The energy is not lost when this happens but changes - the kinetic energy (due to movement) drops but the friction causes heat and the Kinetic energy lost gives you this thermal energy - no energy is distroyed
In a theoretical 'empty' space your tennis ball will go on forever because no force acts to slow it with the same energy.
If you were in orbit around the Earth then the Earth's gravitational field would hold onto it (because you couldn't)throw it fast enough to escape that. It would then continue to orbit the Earth until the drag from the tiny amout of the Earths atmosphere out there finally caused it to re-enter the atmosphere where it'd burn up - kinetic energy becoming thermal energy again
Hope this helps