COLUMBIA, S.C. — South Carolina Gov. Mark Sanford, still clinging to office after admitting to an extramarital affair, wrote in an opinion piece released today that God will change him so he can emerge from the scandal a more humble and effective leader.

“While none of us has the chance to attend our own funeral, in many ways I feel like I was at my own in the past weeks, and surprisingly I am thankful for the perspective it has afforded,” Sanford wrote in the opinion piece distributed statewide for newspapers today.

Sanford, a two-term Republican, returned from a mysterious, nearly weeklong disappearance last month to reveal a romance with a longtime friend in Argentina. In a series of Associated Press interviews, he described the woman as his “soul mate” but said he would work to repair his relationship with his wife, Jenny, the mother of their four sons.

Some lawmakers have called for Sanford to resign, and one state senator plans hearings on whether state money was used to facilitate the trysts. A criminal probe found nothing illegal.

Sanford and his wife left the state earlier this week for an undisclosed location and are expected to return Sunday evening, spokesman Joel Sawyer said.

In the opinion, Sanford vows to work with lawmakers he’s long fought and cites scripture and his faith in God — just as he’s done in his few public appearances since admitting the affair.

“It’s in the spirit of making good from bad that I am committing to you and the larger family of South Carolinians to use this experience to both trust God in his larger work of changing me, and from my end, to work to becoming a better and more effective leader,” he wrote.

The promise comes as the term-limited governor approaches his final legislative session. Even before the scandal, he admitted the session would offer him little chance of success in pushing a small-government agenda that sought to give his office more authority. The possibility of a White House run in 2012 has all but disappeared.

He’s known for slamming fellow Republicans who control state government — once by carrying two piglets to the door of the House chamber to protest spending. More recently, a court order forced Sanford to seek federal stimulus money he refused to accept because of his libertarian principles, despite warnings from education officials of massive teacher layoffs.

Legislators said the governor’s previous pledges to work together always quickly disintegrated.

“We’ve heard it every year,” said House Labor Commerce and Industry Chairman Bill Sandifer. He said he told the governor, “You have gone out of your way to make enemies. You’ve done absolutely nothing to make friends, and now you want us all to be your friends? That’s a pretty tough pill to swallow.”

Sanford, who has long fought to give the governor’s office more control in the legislatively strong state, wrote that he would continue to push his agenda.

Senate Minority Leader John Land, also frequently at odds with Sanford, doubts the governor can change. “If he didn’t get his way, he’d take his balls and go home, so he left a lot of things on the table,” the Democrat said. “You don’t all of a sudden have a midlife crisis and suddenly get along with people.”