Effect of damping on the laser induced ultrafast switching in rare earth-transition metal alloys