Even when faltering homeowners and their banks would both benefit by modifying mortgage terms or arranging a so-called “graceful exit’’ from an unsustainable loan, such negotiations haven’t become standard practice — and the arduous foreclosure process lurches forward, often through bureaucratic momentum alone. One promising solution is for governments to make mediation automatic, by requiring that borrowers be given a chance to sit down with lenders and neutral third parties to attempt to work out a payment solution that is viable for all involved. Mayor Menino is asking the Legislature to make the process automatic in looming foreclosure cases in Boston. Lawmakers should agree, and go a step further by making mediation automatic throughout the state for homeowners facing foreclosure. Similar laws have proved beneficial in Connecticut, Florida, and New York. Massachusetts should follow suit.