Jisang,
Mirror has plastic backing, that snaps onto the motorized had. If you bought OEM BMW mirror, it will come with this backing.
Take screwdriver and carefully pry-off mirror from the head. Take new mirror and snap it onto head, just check alighnment.
On other hand, if your mirror is brocken and new comes glued to the plastic backing, then you may not have to be carefull removing old mirror; just do not break snap features from the head.
I was able to remove mirror without breaking it with two screwdrivers.