Usually we deal with questions related to practical issues which people experience in their day to day life. Your question looks like very far from day to day life, nevertheless if you want the answer for knowledge, it is obligatory to save our life. Deliberate failure in saving life and causing death is a sinful act. It is not permissible to cause death to yourself even if the only food available to remain alive is pork, but no more than what make you survive.
These two options can never happen as the only options in usual life. Allah (SWT) has created thousands of legitimate ways to earn lawful income. Eating Haraam can be permissible in very rare cases when life is in danger, then it will be allowed to take very little of Haraam food just to save your life not more than that.