In the future, I would watch the "maybe I'm just crazy" statements to doctors. Some doctors, if they can't find a clear reason for symptoms, give up and decide it's all in the patient's head. Saying it, even if that's the way they're making you feel, gives them an easy out. I'm no doctor, but I'm pretty sure that mental illness does not cause rectal bleeding. So obviously something else is wrong.
The doctor's statements don't make sense. They say that they can't find a source for the bleeding and suggest that it's being caused by anal sex. If that were the case, wouldn't they have found trauma and a source for the bleeding? Makes no sense. Time to find new doctors.