If you are going through a divorce and want to buy a house, there are a few things to think about.
First, if you have a house and other real estate that you own with your spouse, determine what to do with that. A few of the options are to sell it, one person gets it in the settlement, or one person gets it and cashes the other out. Consult an attorney and an appraiser or two.
If you don't have a house with your spouse, I would still wait to buy until the divorce is final. Acquiring new property before the divorce is final is risky and could complicate the settlement.
Once you have a divorce decree, you can apply for a real estate loan and go find a great new home that you qualify for on your own. Some people buy before a divorce is final, but as I said before, there can be some risks going about it this way.
Consult your attorney on specifics for this subject.