Answer:
having a damaged reputation
Step-by-step explanation:
discredited means to lose your respectability.
Using context clues, why would the witness have left the courtroom in humiliation? It can't be because they have good judgment or that they were honorable. That leaves "sorrowful" and "having a damaged reputation." Having a damaged reputation is more tied to humiliation, but if you didn't pick up on that, credited means of respect and the opposite most closely means having a damaged rep.