As the battery isn't removable or replaceable, when it dies the whole controller needs to be replaced or sent for repairs.
For the PS3, if the battery in your controller fails for any reason, you're left with one of two options. If the PS3 is still under warranty, you can send the controller back for 'repairs.' Otherwise, you'll be out to the store to buy a new one. In order to stick with the PS2 controller's look and feel, Sony has sealed its rechargeable battery in the casing - there is no good way to get it out and make a switch.