You posted this question twice so I removed the other one. Stamina/Energy used to attack the raid boss or heal your party is gone once you use it. However it is not for no gain as you will get Cash and XP each attack on the boss regardless if you kill it or not.
Also you will occasionally get energy drops when healing. These allow you to continue healing or whatever you may need energy for atm.