I heard the Messenger of Allah ﷺ say, "The bond of kinship is attached to the Most Merciful. It says, 'My Lord, I have been severed. My Lord, I have been mistreated. My Lord, I have been wronged. My Lord!' So He answers it, 'Are you not pleased that I join whoever joins you and sever whoever severs you?'"
حدثنا عفان قال حدثنا شعبة قال أخبرني محمد بن عبد الجبار قال سمعت محمد بن كعب القرظي يحدث أنه
سمعت رسول الله ﷺ يقول إن الرحم شجنة من الرحمن تقول يا رب إني قطعت يا رب إني أسيء إلي يا رب إني ظلمت يا رب قال فيجيبها أما ترضين أن أصل من وصلك وأقطع من قطعك
Its isnad is sahih. Haythami said in Majmaa 8/149, "The men of Ahmad are the men of Sahih, except Muhammad bin Abdul-Jabbar, who is trustworthy." The hadith is found in Bukhari with similar wording, 10/417, no. 5988, Fath al-Bari, in the Book of Manners, "Whoever maintains ties, Allah maintains ties with him," and in Tayalisi, 2/35, no. 2033, Minhah.