Well, I had the same issue with my phone, All of a sudden it used to get too hot!
Checked with Samsung service center later got to know its a known issue with few of Galaxy S4 phones
Samsung service center replaced the battery and now it works fine as of now.
That sounds as if the battery is at the end of its life. If you use it like the OP back in 2013, letting it drop to 10% regularly, you'll get less than a year out of it. Replace it (S4 batteries aren't expensive) then try to never let it get below 40%. If you need more than that buy 2 batteries and a charger and switch batteries mid-day. Then charge the one in the phone and the one out of the phone at the same time at the end of the day.My problem is that my Samsung Galaxy S4 gets very hot when It is in my pocket or laying idly on a table and the battery capacity falls very rapidly. Often I have to charge the phone two or three times a day.
Any idea?
As per my experiance,I too have same problem just after I updated my software.when I get this problem I deleted all account including my google acct.now it has stop getting hot but as soon as I sign in with google acct.it starts same thing.so can you please try this once.