"Don't take anything personally" - I think it's more useful to say "Don't take things personally from anyone"
Depending on who says what to you, it might make sense to review it and determine how you choose to process it.
If it's someone close who says something hurtful, you ought to tell them how you feel and you can't do that without taking it personally.