If the battery looks warped and gets noticeably hot while charging, it needs to be replaced. That's a no brainer and it cannot be salvaged or worked around. It's kaput.
If the battery is fine, but when you pick up the phone and it feels slightly warm, even though you haven't used it, then it's...