The game is over immediately if the Action deck is empty and a Curse card is drawn from the Discard Pile.
Here are some examples of times when this might happen:
The Action deck is empty and you are taking an action. You shuffle the Discard pile and draw all the required cards from there. If one of these is a Curse card, the game ends immediately.
There are 3 cards left in the Action deck, and you are attempting an action that requires you to draw 5 cards. You draw the remaining 3 cards from the Action deck, then you shuffle the Discard pile and draw 2 cards from there. If one of the two cards drawn from the Discard pile is a Curse card, the game ends immediately. Any Curse cards drawn in the first 3 cards (from the Action deck) do not end the game, so be sure to keep these separate as you draw the last two.
If the action is completed without ending the game, all of the cards are discarded and the Discard Pile is shuffled. Your next priority should be to find a way to recreate the Action Deck (eating, resting, etc.)