I heard the Messenger of Allah ﷺ say, "The womb is a branch 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, my Lord!'He answers it, 'Are you not pleased that I join the one who joins you and sever the one who severs you?'"
حدثنا عفان قال حدثنا شعبة قال أخبرني محمد بن عبد الجبار رجل من الأنصار قال سمعت محمد بن كعب القرظي يحدث أنه
سمعت رسول الله ﷺ يقول إن الرحم شجنة من الرحمن تقول يا رب إني قطعت يا رب إني أسيء إلي يا رب إني ظلمت يا رب يا رب قال فيجيبها أما ترضين أن أصل من وصلك وأقطع من قطعك
Its isnad is sahih. Muhammad bin Abdul-Jabbar is trustworthy, even though Ibn Hajar reported from Aqeeli that he is unknown, and likewise Muhammad bin Kaab, the soundness of his hadith is preferred, for the two Shaykhs [Bukhari and Muslim] narrated it from him, and the hadith is found in both of them. Bukhari narrated it in 8/7, and Muslim in the book of Righteousness, no. 17, and Tirmidhi 1924, and Tayalisi 2033 Minha, and Ibn Abu Shayba 8/348. The hadith has already appeared at 2956, and will appear again at 9832 and 9244.