Is it legal to be engaged to a man while you are still married but going through a divorce?
Yes, it is completely legal--that's because "engaged" has no legal significance or important whatsoever. Since it has no legal status, being engaged or affianced has no more affect on being married to another than calling someone your "boyfriend" or "significant other" would have. And since it does not affect being married, it does *legally* affect divorce.
That said, the behavior of parties is often taken account of when deciding on issues like custody, support obligations, distribution of assets, etc.--even when the behavior is not supposed to impact on those things, it may, since the people deciding them (e.g. the judge) are human, and will be influenced by how they view the soon-to-be ex-spouses. Therefore, since it probably "looks bad" to get engaged while still married, you may wish to hold off, since even you are legally allowed to do this, doing so could still impact elements of your divorce.