A hotel has closed its doors and is set to be transformed into homes after planning approval was granted for a change of use.