Eminem’s biological father — who the rapper frequently rapped about abandoning him — has died … TMZ has learned.

Marshall Bruce Mathers Jr. died this week near Fort Wayne, Indiana … according to family members and neighbors. A family source tells us he apparently suffered a heart attack while at home.

According to Eminem’s mother, Debbie … Mathers Jr., who went by Bruce, married her when he was 22 and she was 15, and they had their son 2 years later. They split up shortly after, and Eminem and his mom settled in Detroit with her family while Bruce moved to California … where he had 2 other kids.

Eminem has said in interviews that he wrote letters to his dad as a child but they always came back “return to sender.” The rapper said Bruce would sometimes call while family members were babysitting, but he would never actually talk to him on the phone.

In 2001, Bruce published a letter addressed to his son in a newspaper explaining his side of the story — that Eminem’s mom kept him away. Still, Eminem apparently never got in contact with his father to reconcile.