Neo had nothing to lose by making a deal with Deus Ex Machina
By the time Neo met with Deus Ex Machina it was clear that the machines were going to be able to destroy Zion, and Smith was in the process of destroying the Matrix as well. The Architect's prediction that mankind would become extinct if Neo did not return to the Source seemed to be coming true. Neo had to find a way to convince the machines not to destroy Zion, and with the Oracle's guidance he found a solution. The Oracle made it clear to Neo that Smith must be destroyed for the good of both the humans and the machines:
Oracle: Everything that has a beginning has an end. I see the end coming. I see the darkness spreading. I see death. And you are all that stands in his way.
Oracle: nods Very soon he’s going to have the power to destroy this world, but I believe he won’t stop there; he can’t. He won’t stop until there’s nothing left at all.
Neo: What is he?
Oracle: He is you. Your opposite, your negative, the result of the equation trying to balance itself out.
Neo: What if I can’t stop him?
Oracle: One way or another, Neo, this war is going to end. Tonight, the future of both worlds will be in your hands… or in his.
The Matrix Revolutions transcript
If the Oracle (a machine) recognized that Smith is an existential threat to the machines then Neo could see that Deus Ex Machina might understand that threat as well and would be willing to work with the humans. This gesture of goodwill -- and proof that the humans and machines could work together for the benefit of both -- is a powerful case to Deus Ex Machina that humans and machines should work together.
Of course, Deus Ex Machina could have nonetheless reneged on the deal after Neo had defeated Smith (and died). But so what? If Neo hadn't made a deal then mankind would surely become extinct; by making a deal Neo at least ensured that there was a chance mankind could be saved, which is better than the certainty mankind would be destroyed without a deal. Furthermore, if Deus Ex Machina reneged by starting another Matrix that's still a better outcome than the extinction of all mankind.
Neo believed some machines were trustworthy because he already trusted a machine (the Oracle)
When Neo realized the Oracle was a machine he asked her a pointed question about how he could trust her:
Neo: If I had to guess, I’d say you’re a program from the machine world. So is he.
The Oracle: So far, so good.
Neo: But if that’s true, that can mean you are a part of this system, another kind of control.
The Oracle: Keep going.
Neo: I suppose the most obvious question is, how can I trust you?
The Oracle: Bingo! It is a pickle, no doubt about it. The bad news is there’s no way if you can really know whether I’m here to help you or not. So it’s really up to you. You just have to make up your own damn mind to either accept what I’m going to tell you, or reject it. Candy?
The Matrix Reloaded transcript
The Oracle didn't sugarcoat the problem: Neo really didn't have any way to know if she was helping him.1 Similarly, Neo didn't have any way to know if Deus Ex Machina could be trusted. However, Neo had come to trust in the Oracle so he believed that some machines were trustworthy. If he could trust the Oracle then perhaps he could trust Deus Ex Machina, too. Furthermore, the Oracle had already been guiding him that the key to the future was for the humans and machines to work together -- so working with Deus Ex Machina was really a sign of his trust in the Oracle.
1The Oracle gave Morpheus the same answer when he questioned her:
Morpheus: After everything that’s happened, how can you expect me to believe you?
Oracle: I don’t. I expect just what I’ve always expected. For you to make up your own damn mind. Believe me or don’t. All I can really tell you is your friend’s in trouble and he needs your help. He needs all our help.
The Matrix Revolutions transcript