Hi,
It seems as though the battery is failing under load.
Here is a link to the service manual for your tablet. Scroll to p.54 to find the necessary pre-requisites and then the procedures to remove the battery. To replace the battery just reverse the removal procedures / pre-requisites.
http://h20566.www2.hp.com/hpsc/doc/public/display?sp4ts.oid=5298028&docLocale=en_US&docId=emr_na-c03664461.
Here is the part number for the battery, 685987-005. If you search online, using just the number - nothing else, you will get results for suppliers of the part. This is not a recommendation, it is merely shown to give you an idea of the price of a battery.
https://www.alinc.com/battery-primary-2-cell-lithium-ion-li-ion-685987-005.html