Hi!
Are those painful memories about some of your past sins?
If yes, then I can relate to your pain.
Someone said that we are the cruelest judges of ourselves. I know I am. That person also said that we must accept our past, what we did, and transfigure it (find a redeeming meaning in it).
Some painful memories come back in order to humble ourselves; to stop us from judging the sins of our brothers, have patience with them and not displaying an attitude of self-righteousness. Our boast is in Jesus Christ (not in us) who loves and waits patiently for all to repent and come to Him. Not all repent and when some do repent, it doesn't happen when we want; the heart and mind of man are a complex mechanism unknown to us. Only our Creator knows and understands.