Why complicate the meaning of the word “righteousness”? It means to do what is right.
Self-righteousness is doing what’s right in your own eyes. Righteousness is doing what is right in God’s eyes. There’s a big, big difference.
Don’t get tangled up in abstract, theological definitions of “righteousness” – just do what is right and God will be pleased.
For more on this subject, see Do You Love What Is Right?