There are some interesting survival food products available for long-term storage on your boat - some good examples here:
I would probably buy a box of the 3600 calorie bars (20 or 30 bars) - stow it in a locker - and then have some peace of mind in the event I was dis-masted and might need to drift for a few weeks.
Of course, still need to solve the drinking water problem - but a Katadyn Survivor 06 or 35
hand-powered desalination pump would be part of my kit.
Ideally, my next boat will get aKatydyn Power Survivor 40E 12V desalinatior