The consensus of the poskim is that one must be careful about Yichud even in a doctors office. Doctors, it turns out, have yezer haras too, and might be attracted to their female patients.
So a woman should be careful that the door is a crack open and/or that nurses can come in at any second.
There is a general heter of בעלה בעיר - if her husband is in town yichud is permitted but where he knows and permits his wife to seclude herself this may not apply.
Ideally, a female should go to a female doctor - especially ob-gyn's. There are many good ones out there today.
The same issue would apply to a psychologist so one should make sure the door is open or that people habitually walk in or that there is a window and people can see in. A therapist is someone with whom you share deep emotional issues and thus, the closeness engendered by such an interaction is fraught with spiritual danger.
If at all possible one should choose a therapist of the same gender [this is besides the fact that a man can't fully understand a woman and vice versa. Freud is quoted as saying that after decades of doing therapy with women he remains with one question - "What does a woman want..." I myself have been doing a study of many years trying to fully figure out the female psyche and my conclusions in the meantime are, to paraphrase a great Jewish thinker's statement about Hashem - "To understand a female you must be a female" ].