EXCLUSIVE

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.

Eminem, whose real name is Marshall Bruce Mathers III, has made no secret of his lifelong grudge against his father and rapped about never meeting him in person. His hit songs like "My Name Is" and "Cleanin' Out My Closet" reflect those feelings.

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.

In "Cleanin' Out My Closet" ... Em rapped, "My fa***t father must've had his panties up in a bunch ‘Cause he split, I wonder if he even kissed me goodbye. No, I don't, on second thought, I just f**kin' wished he would die. I look at Hailie, and I couldn't picture leavin' her side."