To activate the infinite health cheat in Jak 2, press the following button sequence:
Up, Down, Down, L1, and Circle.
Enter it correctly and you'll be able to take damage without worrying about your health running out.