Kobe Bryant says his wife Vanessa Bryant miscarried in 2004 … right in the thick of his rape case in Colorado … and says he blames no one but himself.

Bryant opened up about the situation in his Showtime documentary “Muse” — and while he never specifically mentions the case, it’s crystal clear what he’s talking about.

During the segment titled “2004” … the year of the hearing (which was eventually dismissed when the accuser refused to testify) … Kobe says:

“We were expecting … and um … expecting our second child during that time … and there was just so much stress, she actually, she actually miscarried.”

“It’s something … I have a real hard time dealing with that ’cause I felt like it was just my fault.”

Kobe added, “The reality is it happened because of me … that’s something I have to deal with. Something I gotta carry forever.”

Kobe also praises Vanessa … saying she could have left him and taken half of his money … but didn’t.

tagged in Kobe Bryant