Without exception, seriously consider consulting with a lawyer before you make any decision affecting your legal rights. I've heard about mediation, but I've also heard that the less sophisticated spouse is more likely to be taken advantage of. True, there may be an imbalance of power. Your lawyer can help advise you through the mediation process. Also, an ethical and experienced mediator will take this into account and even reject cases if there is a likelihood of fraud or unfair dealing.
Ethical mediators encourage clients to have independent counsel review divorce agreements.
Your lawyer might play only a limited role, depending on the situation and complexity of the issues. Your lawyer should advise you to make sure the agreement is fair and reasonable. Although some do, mediators are not supposed to offer any advice as to whether the terms of any agreement are fair or reasonable, or comment on what a particular judge might order in the event of a trial. Well, this all sounds reasonable, but my spouse would never agree to mediation. Some judges are ordering persons to mediate cases over the objection of one of the parties.