Frodo: I wish the ring had never come to me. I wish none of this had happened.
Gandalf: So do all who live to see such times. But that is not for them to decide. All we have to decide is what to do with the time that is given to us. There are other forces at work in this world Frodo, besides the will of evil. Bilbo was meant to find the Ring. In which case, you were also meant to have it. And that is an encouraging thought.
Perhaps those choices that we thought were mistakes were actually necessary for our own development of character. Perhaps those choices needed to happen for some reason. Wishing for a past that never happened can only lead to depression.
At any rate, there isn't anything we can do about our past mistakes other than looking forward with hope, striving to do better, and losing ourselves in the service of others. We can't change the past, but we can certainly anticipate a bright future.