I always try to avoid them by only exploring in daytime. If it's not possible to avoid them (such as when running through dense forests), having a higher tier armor really helps when you are being attacked. In addition to that, having maximum possible health points by eating a variety of food (fruit, vegetable, grain, portein and dairy) gives you more room to withstand hits. In my current world, I am able to successfully fight bears using a bow/spear, iron falx and bronze brigandine armor, even when it's not always easy and sometimes a close-call.
I also observed that if bears follow you into water (e.g. into a lake), they tend to drop down below water surface and if that happens, you can attack them without them being able to attack you. They seem to struggle into water during a fight. I do not know if this is intentional or maybe just caused by the game mechanics itself, but you can make use of that.