Ray J's had it up to HERE trying to strike a settlement with "Celebrity Big Brother" for kicking him off the show ... so he's gonna sue to get the dough he says he's owed.

Sources close to Ray J tell TMZ ... his legal team and the production company have been negotiating for months but talks have hit a wall ... so RJ's manager, David Weintraub, has given his legal team the green light to file papers.

The issue -- Ray J says 'CBB' agreed to pay him $1 million and he says the show's gotta cough it up because 'CBB' unfairly kicked him out following a dental emergency.

TMZ broke the story ... Ray J was booted from the UK show back in January after complaining of an unbearable toothache that required a dentist to visit on set, 8 pain killers and an ambulance ride to the hospital after blacking out.

Ray J will ask that the show pay him the hundreds of thousands he says he's still owed, a public apology and an invitation to come back next season.