Use the console to enter these commands:
■ completequest 0007431B
■ resetquest 0007431B
■ resetquest 00021382
No need to target spouse or anything, this just completes the ingame divorce quest and resets your marriage quest.
The person who posted this gem on the wiki cautioned that your ex-spouse will tell you how much even the thought of you makes their blood boil whenever they see you.
But this didn't seem to happen to me when I divorced Mjoll (she still considers me her friend and will follow me if I ask -- which is what I wanted all along).
I knew how to get rid of her as my spouse by removing her essential status, killing her, resetting marriage stage, and resurrecting her... But once she was off my screen, she'd always get sent to the Skyrim NPC wastebasket (or the Nord Hell .. whatever you call it.).
My previous attempts:
http://www.gamesas.com/index.php?/topic/1307407-divorced-mjoll-where-did-she-go-o/page__p__19667210#entry19667210
And a picture of where Mjoll kept ending up before trying this new method

http://img249.imageshack.us/img249/3587/2011120600001.jpg
But this time it seemed to work fine. She left my house in Whiterun and I waited 24 hours and went to Riften and there she was doing her thing, walking around the market and going to the Bee and Barb.
Then I fast travelled to Markarth and waited 24 hours and went back to Riften, she was still there, fully functional.
The blood-boiling bit may only apply to Villager spouses.
