Dealing With Breaking Up - How to Apologize If You Made the Mistake

You know your breakup happened because of a mistake you made, but it is not easy to apologize and you know a casual apology is not good enough. How do you apologize to make sure it works?