No, it is generally not recommended to defend yourself from a bear with a chainsaw. Chainsaws are dangerous and unpredictable, especially in close proximity to a bear. Bears have powerful claws and teeth capable of inflicting serious injuries. While a chainsaw might scare a bear away, it is not a reliable or safe defense tool.
Bear spray and high-powered firearms are more effective and recommended choices for defending against bears.