Earl Hayes -- the man who cops say shot his famous wife to death Monday and then killed himself -- was haunted by her infidelity ... in particular what he said was a fling she had with singer Trey Songz.
As TMZ reported, Stephanie Moseley -- the star of VH1's "Hit the Floor" -- was gunned down in their L.A. apartment as neighbors heard her screaming. Shots rang out, the SWAT team came, busted through the door and discovered the 2 bodies.
Sources connected with Hayes tell us ... around 2 years ago he separated from Stephanie because of what he says was her affair with Songz. They got back together but, as one friend put it, "He was crushed and never got over it." We're told he frequently brought up Songz.
Hayes accused Moseley of having multiple affairs with various other entertainers. She was a backup dancer who worked with numerous famous singers, including Chris Brown and Usher, but we're told Hayes never mentioned them as a source of conflict.
Hayes and Moseley married in 2008 and his friends say he loved her and tried rationalizing staying together.
TMZ broke the story ... Floyd Mayweather was on FaceTime with Hayes when he flew into a rage over Moseley's alleged infidelity and the boxer was witness to the murder/suicide.
We reached out to Songz and got no word back, but Monday night he tweeted this.