I agree with other answers that the best option is to get a secondary payment card from another bank or service.
However, when you lose your card(s) it's unfortunately sometimes the case that a card was lost in a purse or bag that also contained other important items. In some disaster scenarios, travelers lose not only their cards, but also their phone, ID, etc. This answer deals with how to mitigate the adverse effects of even such disasters.
When you lose absolutely everything
Western Union
Western Union allows you to receive up to 1000 USD, even in the case you lose your passport. The money is collected using a secret password given to you by the sender. Before your journey you could ask a trusted friend or family member if they would be willing to do that for you should you find yourself in such a situation. It is easier if you have talked to them in advance and made sure that they know how to use WU, minimising the time needed during an emergency. This means that you have a last resort in a total emergency when you lose absolutely everything. WU offices/agents are found all over the world, even in small towns in remote areas. The main inconvenience of this approach is that if you do not have identification, WU demands that you report loss of ID to the local police before receiving money in such a way. However, in a total emergency, that may be less inconvenient than other options. Also, it is important that your friend/relative verifies that it is actually you before sending, as claiming to be a loved one in distress is a common scam method.
While I was backpacking in challenging areas I always used to have a 2000 rupee note (25 EUR) hidden in my shoe, just in case of disaster or anything and I needed to access the internet, get a taxi, or anything like that. This has the additional benefit of helping you out when there are no working ATMs nearby, or when the internet is down in your area.
Cryptocurrency
Some countries have Bitcoin ATMs. In places with no such ATMs, you may possibly find someone willing to trade cryptocurrency for cash. For emergencies, you could keep some bitcoin in case you lose everything. You could keep the secret key to this bitcoin in the cloud somewhere, encrypted with a password that you have memorised. You can also print the secret key (use a cipher for safety) and keep it with you. Many Bitcoin ATMs require a smartphone to withdraw money, so in case you lose absolutely everything, you may need to borrow a smartphone, or print a QR code at an internet cafe.