Recently I had the following dialogue, which perhaps may be helpful to others:
Dear Doug, I have a tax question. I'm getting a divorce. My spouse is in jail. How do I go about filing taxes when it is time?
Answer: You can for sure submit a tax return using the status "married filing separately". If you did not live with your spouse even one day during the last six months of the year, you may do better filing using the status "head of household", if you meet the other requirements for that status. Either way you don't have to involve your spouse, who will be on their own to meet tax filing requirements on any income they had for the year.
Follow-up question: How does it work with my spouse being in jail?
Answer: You file a separate return without them.
As with anything else, these decisions are highly personalized. Be sure to get qualified help to make sure you make the best legal choice for you.