I think your attitude at this point has to be, "What I really need right now, and all I need right now, is a strong letter of recommendation. To heck with the past."
Your former adviser has actually made you a very good offer: write the letter yourself. WriteThus, do write a letter that focuses on what the project was about, what you believe you contributed, and what the results were -- including that the results were very meaningful and that your thesis led to a publication. Do mention which outlet the piece was published in. If you think it's relevant, you may also write something about how you think you developed as a researcher during the project. Focus on output and don't dwell on inputs, i.e., don't write something like "advisee"Mr. X worked long hours, including lots of weekends".
You have, of course, no control over how your ex-adviser may see fit to edit the letter once you hand it over to him. IfHowever, if you limit your letter to what's factually correct and essential to your potential future employer, I think there's an excellent chance that the ex-adviser may simply see fit to sign itthe letter and passsend it on to whomever you say needs the letter. I see two reasons for being optimistic. First, don't underestimate the power of inertia: If the adviser wants to apply a fewany edits (minor or major) edits, he will have to do the extra work. Given that you described his eventual behavior (correctlyaccurately or incorrectlyinaccurately) as "passive aggressive"passive aggressive, he may conclude it would bedecide it's too much work on his part to even edit the letter. Second, don't underestimate the wishdesire of many advisersestablished researchers to come across as havinghave successful advisees. If he were to write something unflattering about you, that may well be read as a sign of failure on his part. If he's at all rational, he'll want to avoid the risk of creating such an impression.