How to regain lost maximum health?
Upon dying in endless mode you turn into a ghost, using the jury-rigged portal to revive will reduce your maximum hp.
How can you gain back the maximum hp that you lose to the jury-rigged portal?
You can regain your maximum hp by using "Booster Shots" from the "survival" tab, which restore 20 max hp each.
Booster shots can be crafted from: 8 rot, a stinger and 2 nitre (recipe recently changed).
So keep an eye out for bees, rocks and spoiled food if you want to make some booster shots.