EXCLUSIVE

King posted to his Facebook page on Tuesday, writing, "I want to thank everyone for their concern and good wishes. I'm feeling much better & am leaving the hospital today."

Blues legend B.B. King was rushed to a Las Vegas hospital this past weekend ... we're told for a diabetes-related emergency.

King's rep tells TMZ ... he remains hospitalized at a medical center close to his Vegas home.

Another source tells us the 89-year-old's health emergency was the result of dehydration from his Type II diabetes ... a condition he's lived with for more than two decades.