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. 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 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. If you limit your letter to what's factually correct and essential, I think there's an excellent chance that the ex-adviser may simply see fit to sign it and pass 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 few (minor or major) edits, he will have to do the work. Given that you described his eventual behavior (correctly or incorrectly) as "passive aggressive", he may conclude it would be too much work on his part to even edit the letter. Second, don't underestimate the wish of many advisers to come across as having successful advisees. If he were to write something unflattering about you, that may well be read 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.