First thing to do is to forgiving yourself is to realize that everyone makes mistakes. No one is immune to them because we're all human. No one will get through life without making mistakes. Realizing this can help you to not be so hard on yourself. Many people struggle in dealing with mistakes they've made but there's hope in moving past them for everyone.
Think about the place you were in life, It's good to think about the place your life was when you made the mistakes you're regretting. Maybe you were depressed or going through a difficult time. Maybe you were down on your luck and didn't know where to turn. You were probably just doing the best you could in the present circumstances. Try to be as understanding with yourself as you would be with someone else.
If there's a way to make amends for a mistake then that's a great thing to do. If you've hurt someone by something you said or did, there are specific things you can do to try to make amends. You can apologize to them or talk to them about what happened. Maybe it was a situation where there was fault on both sides. You can still apologize for your part even if they never do. If you've come to a point where you regret mistakes in your past then you've more than likely learned from them. You can look back at the things you've done and see what you could have done differently. This means you've learned your lessons. You've done all that you can about the situation. This should help you to reach a place of peace.
Looking ahead is always a good step and one that means you're doing well at forgiving yourself. You know you aren't going to repeat the same mistakes. You're going to be a better person because of them. You know that you've grown through the mistakes you've made. Your future is bright with possibilities. One thing to do to help yourself move on is to help others that are going through a similar situation. Maybe you can reach out to others doing the same things you did. Speaking about what you went through and why you behaved the way you did can get the attention of others. Whatever mistakes you made can be used for the good if you look for a way to do that. This'll make you feel better about yourself, too.