As truly said by many people here, HR has to be self-motivated as they have taken up the responsibility of motivating others. During the time of recruiting HR staff, this characteristic has to be kept in mind. In fact, when a person chooses HR as a career, it should not be because he is not left with any other option. Talking to people, listening to them, counseling, helping in difficult times should be a passion for him/her. Such a person would never find himself demotivated as his source of motivation will be the satisfaction he derives by listening to others and helping them.
Nevertheless, HR staff are also human beings, and they also face ups and downs in life; they can also be demotivated. At that time, the first support comes from their colleagues - i.e., other members of HR, their reporting officer/senior. Also, if they have really helped other employees during their problems, support will come from them.