At first, her fear is making a decision. She realizes that if she does what she has on mind, there are two possible scenarios: she could win or she could lose. “If I should fail, what poverty!” – “And if I gain,—oh, gun at sea,”
The poem gives the impression of a speaker who thought in everything before jumping into a choice. “To know the worst is sweet”. She predicted her worst case scenario and decided that she could live with it.
And if, indeed, I fail,
At least to know the worst is sweet.
Defeat means nothing but defeat.
Even though her fear at first was making a decision, on the first stanza she conquered that fear by choosing to go for it,