That Azelf seems pretty stubborn. For Mesprit, it took me around 40-50 poke balls after a reset. Azelf took me 20-30 first try. And I'm still working on Uxie. Had to reset twice, unfortunately, he can only be caught during a certain hour of the day.
Capture rate is always low for the Legendary Pokemon. It just takes a lot of patience, and sometimes a bit of luck. Pressing A + B + Down never hurts (Though it doesn't really help either, haha.) Best of luck.