Dealing with hurtful comments

How do you deal with hateful comments from strangers on YouTube that attack you personally? I know we should ignore them and not let them affect us, but we're only human, and sometimes we can get hurt or have our moods affected. What practical steps do you take to handle this?