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.
For most people, given that they are part of a species who's superpower is collaboration at planet scale and who evolved accordingly, the hedonic pleasure of acting morally congruent and being embraced by a community, as well as hard wired tendency towards empathy does the rest of the trick. How you grow up and what trauma shaped your intellectual and emotional development will affect who you consider worthy of empathy and care ofc.