I think I'm a bad person
Why do you think you're a bad person?
I've caused great pain to others in the past
Being a bad person when it causes pain to other people is incorrect. Look at your behaviour and see what you can do to be kinder and more loving.
I'm mean to people.
If you're still mean to people, then you should work on your bad habits and try to be nicer instead.