In my UP campaign (VH/VH, currently in the mid 1760s) I went bankrupt at least half a dozen times due to wars interrupting my trade routes. I was getting so much income from trade in the East Indies and with Marathas, that a large fleet parked anywhere from Madagascar to the Bay of Biscay would swing me from 8k income to 6k deficit. Spain loved parking fleets there.
The way I handled it was to constantly bribe Spain to leave me alone. They would declare war, blockade the trade route, and I would go bankrupt. I'd find a way to get some money together (usually by undoing buildings that were in progress) and buying peace. This usually bought me about 4-5 turns of peace and normal income before Spain would declare war again. Rinse and repeat buying them out of the war. I pumped all my spare money for a long time into building a formidable fleet. Eventually, I had a large fleet of 2nd Rates ready to protect my trade lanes. When Spain declared war that time, I beat their navy to a pulp and proceeded to wage war against them with my income intact.
Lesson Learned: If your income is massively dependent on trade, you need to maintain a strong fleet at all times.
Bookmarks