Diagnosed OCD and GAD. For me, testosterone and DHT-based anabolics have had no negative effects regarding OCD/anxiety, but I've never gone above 500mg weekly of test E nor for very long. The only compounds I would advise avoiding would be tren and EQ, or other anabolics with a reputation for wreaking havoc on emotions/anxiety.
Also, keep in mind the effects of PCT drugs such as clomiphene (Clomid) and other SERMs as well as AIs. (Strangely enough, tamoxifen (Nolvadex) is actually very calming for me, and there are studies to back that up.)