People often ask whether they should delay or pause therapy during their divorce case, mainly out of fear it might be used against them. This fear is usually unfounded Most judges, especially in a family law case, are looking to see who is reasonable and self-aware enough to take appropriate initiative, and get the right help when they need it. From this perspective, you actually are strengthening your case if you get needed therapy during your divorce.
In addition, family separation and divorce are among the most stressful experiences anyone ever has. It is absolutely normal, if not necessary, for people to get some counseling or therapy during these times. You, and the people around you, including your lawyer, need you to be focused and logical in your decision making. Therapy can help reduce the emotionality of your reactions, and improve the overall outcome of your case. This is one of the reasons attorneys routinely suggest to divorce clients that they try therapy, at least to see whether it might be helpful.
And many people benefit from therapy for other reasons, unrelated to the divorce. There are people who started therapy because of their divorce, and then continued long afterwards, just because of the benefits in other aspects of their lives.
Finally, the law provides for confidentiality of treatment discussions between a patient and their licensed counselor or therapist. Some exceptions exist, though, so it is important to discuss the circumstances of your therapy with your lawyer.