It is just like the Laws of a country. Basic purpose of the laws, rules and regulations in a country is to provide safety, security and peace to its citizens. At the same time, same Laws punish the people who violets it. So Mercy and vengeance coexists at the same time.
Same is true for Almighty Allah, he is merciful for those who obey his laws and punish those who violet his laws.
Only your choice matters, which way you wanna go. And Human is completely free to choose his destiny.