Right, this is why you resolve act as if there is. If there isn't, then "you" didn't really resolve to do anything anyway, or at least it was inevitable that you would make that choice (for example that you would follow this line of reasoning) so it didn't matter. "You" weren't wrong because "you" weren't anything but an automaton.
If there really were such a thing as free will, whatever that means, then by acting like there is, you were acting correctly.
It's sort of like how in math, when you're dealing with an if statement, a false premise gives your conclusion for free. You only need to consider the case that you have a choice in the first place when deciding how you should act. Therefore you should act as if free will exists, even if deep down you really don't believe it does.
Basically "I should choose to act as if I have free will" really expands to "if I can choose how to act, then I should choose to act as if I have free will," which is then straightforward basic logic.