I'm not licensed in Maryland so don't take this as legal advice. I just want to say something about the general legal principle.
You and your wife made a deal with the mortgage lender. You are jointly responsible to the mortgage lender. Even if you and your wife strike some kind of deal about who pays the mortgage, or even if the divorce court orders one or the other of you to pay, the two of you still have your deal with the lender. If there's a default, the lender can come after either one of you, EVEN IF the divorce court has said your wife is responsible for the mortgage.
You and wife need to either come to some agreement about what happens, or the court orders who is to get the house, and then the person who is going to get the house needs to do a refinance which removes the spouse from the mortgage.
That's the general principle. A matrimonial lawyer who practices in Maryland could give you specific legal advice on your particular situation, which I can't do because I don't hold Maryland licensure. Consult such a lawyer if you need legal advice.
You did not mention whether you have minor children who will stay with your wife. If yes, the Court may award your wife the possession of the home for three years and may order you to make payments for house expenses. After three years, the house would be sold and the proceeds (if any) divided. If you do not have minor children, the house should be sold now. The division of proceeds may be a difficult issue. You need to consult an attorney.
In the divorce proceedings, the judge will determine who will be obligated to pay the mortgage and other marital debt. In one possible scenario: if you have children, the judge may order you to continue to split the mortgage until your child(ren) reach the age of majority. Thereafter, the house will be sold and the proceeds split between you. There are a myriad of other scenarios.
In any event, you should interview several attorneys and retain one now to protect your legal interests.
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.