If you can’t get comfortable with people hating you, you will never escape being defined by haters.
Just make sure that if you’re hated, you’re hated for the right reasons. Being a rude jerk is not a good reason.
In fact, we strive for ikhlas even in matters of hate, meaning that if people are going to hate us, we want them to hate us purely for the sake of (our belief in) Allah. If people hate us because of something we did to them, such as treat them unjustly or rudely, then this is hate that we are responsible for rectifying and are accountable for.
If the only reason people can find to hate us is our devotion to Allah, His Messenger, His deen, then that is a good sign for us. Just like we monitor the state of our ikhlas when it comes to our Islamic commitment and love for Allah, we should monitor this kind of “ikhlas” from our detractors and strive to correct any problems. The two are interconnected.