Just sharing few hadiths on this topic and then I will elaborate on this to the best of my ability ( my opinion only, you are free to take it or leave it):
Abu Huraira reported that a person said:
Allah's Messenger, I have relatives with whom I try, to have close relationship, but they sever (this relation). I treat them well, but they treat me ill. I am sweet to them but they are harsh towards me. Upon this he (the Holy Prophet) said: If it is so as you say, then you in fact throw hot ashes (upon their faces) and there would always remain with you on behalf of Allah (an Angel to support you) who would keep you dominant over them so long as you adhere to this (path of righteousness).
حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، وَمُحَمَّدُ بْنُ بَشَّارٍ، - وَاللَّفْظُ لاِبْنِ الْمُثَنَّى - قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ الْعَلاَءَ بْنَ عَبْدِ الرَّحْمَنِ، يُحَدِّثُ عَنْ أَبِيهِ، عَنْ أَبِي، هُرَيْرَةَ أَنَّ رَجُلاً، قَالَ يَا رَسُولَ اللَّهِ إِنَّ لِي قَرَابَةً أَصِلُهُمْ وَيَقْطَعُونِي وَأُحْسِنُ إِلَيْهِمْ وَيُسِيئُونَ إِلَىَّ وَأَحْلُمُ عَنْهُمْ وَيَجْهَلُونَ عَلَىَّ . فَقَالَ " لَئِنْ كُنْتَ كَمَا قُلْتَ فَكَأَنَّمَا تُسِفُّهُمُ الْمَلَّ وَلاَ يَزَالُ مَعَكَ مِنَ اللَّهِ ظَهِيرٌ عَلَيْهِمْ مَا دُمْتَ عَلَى ذَلِكَ " .
Reference: Sahih Muslim 2558 a
In-book reference: Book 45, Hadith 25
USC-MSA web (English) reference: Book 32, Hadith 6204
https://sunnah.com/muslim/45/25
In another hadith:
Jubair b. Mutlim reported that his father narrated to him that Allah's Messenger (ﷺ) said:
The severer of the tie of kinship would not get into Paradise.
حَدَّثَنِي عَبْدُ اللَّهِ بْنُ مُحَمَّدِ بْنِ أَسْمَاءَ الضُّبَعِيُّ، حَدَّثَنَا جُوَيْرِيَةُ، عَنْ مَالِكٍ، عَنِ الزُّهْرِيِّ، أَنَّ مُحَمَّدَ بْنَ جُبَيْرِ بْنِ مُطْعِمٍ، أَخْبَرَهُ أَنَّ أَبَاهُ أَخْبَرَهُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " لاَ يَدْخُلُ الْجَنَّةَ قَاطِعُ رَحِمٍ " .
Reference: Sahih Muslim 2556 b
In-book reference: Book 45, Hadith 21
USC-MSA web (English) reference: Book 32, Hadith 6200
https://sunnah.com/muslim/45/21
In another hadith:
Narrated `Abdullah bin `Amr:
The Prophet (ﷺ) said, "Al-Wasil is not the one who recompenses the good done to him by his relatives, but Al-Wasil is the one who keeps good relations with those relatives who had severed the bond of kinship with him."
حَدَّثَنَا مُحَمَّدُ بْنُ كَثِيرٍ، أَخْبَرَنَا سُفْيَانُ، عَنِ الأَعْمَشِ، وَالْحَسَنِ بْنِ عَمْرٍو، وَفِطْرٍ، عَنْ مُجَاهِدٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو ـ وَقَالَ سُفْيَانُ لَمْ يَرْفَعْهُ الأَعْمَشُ إِلَى النَّبِيِّ صلى الله عليه وسلم وَرَفَعَهُ حَسَنٌ وَفِطْرٌ ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " لَيْسَ الْوَاصِلُ بِالْمُكَافِئِ، وَلَكِنِ الْوَاصِلُ الَّذِي إِذَا قَطَعَتْ رَحِمُهُ وَصَلَهَا ".
Reference: Sahih al-Bukhari 5991
In-book reference: Book 78, Hadith 22
USC-MSA web (English) reference: Vol. 8, Book 73, Hadith 20
https://sunnah.com/bukhari/78/22
I am sure most of you would have already heard about these hadiths but I just mentioned those as a reminder because reminder does help as Allah Subhanahu Wa Taala has said multiple times in Quran. What one could deduce from all above hadiths is that if you could do your best to keep the ties of kinship and you could be patient while your relatives are treating you badly you may be rewarded in the hereafter.
Now the question is how far can one take this?
Of course the first option is to have patience and try as much as possible to keep ties of kinship.
But if it is harming you and you fear that having more interaction may harm your relationship permanently then of course you can avoid such situations. You can reserve yourself and keep to as minimum as possible. May be call or text once in a month to see how your relatives are doings.
There is also a concept of gracious avoidance ( mentioned is verse 73:10) in Islam. What this means is to have very limited social relation with your abusive relatives but without any bane or any kind of vengeance or dislike. Many scholars are of the opinion that
gracious avoidance is allowed if one fears due to social relation a harm in your faith or your worldly life and an increase of animosity and hatred. So avoiding in those cases is safer than to approach and maintain ties. As it would prevent you from slips as you will be safe from aftereffects of this company.
In Summary, you can either choose to be patience and work towards keeping ties of kinship if it does not have a drastic impact on your faith, physical/mental health and your relationship with them in general. But if this is to a point where not only your faith and physical/mental health are being impacted but also results in animosity and hatred towards your relatives, then it is best to avoid and keep it to minimum while making sure you don't talk bad about them.
And Allah knows the best!
I also find something similar on this topic on Islamqa website. I will quote them below directly and provide link to their fatwa in this regard:
But if someone does not have the strength to do that or to respond to their mistreatment with kindness, and he is afraid that if he mixes with them they will harm him by means of witchcraft or other kinds of harm, as mentioned in the question, then he may cut off ties with them and shun them, for fear of their evil.
Ibn ‘Abd al-Barr (may Allah have mercy on him) said:
The scholars are unanimously agreed that it is not permissible for a Muslim to shun his brother for more than three days, except in the case where he fears that speaking to him and upholding ties with him may undermine his religious commitment, or expose him to harm in his religious or worldly affairs. If that is the case, then he is granted a concession allowing him to avoid him and keep away from him, and perhaps cutting off ties with him and shunning him in a good way will be better than mixing with him in a way that leads to harm.
https://islamqa.info/en/answers/1435...they-shun-them
And Allah knows the best!
May Allah make it easy for us to exercise patience as much as we can and keep the ties of kinship without harming ourselves or others. Ameen!
Ma'aSalaam