Here is the verse as it appears in the New Testament writings in relation to part of what you said are the works of the Law.
Matthew 5:38 NASB - "You have heard that it was said, 'AN EYE FOR AN EYE, AND A TOOTH FOR A TOOTH.'
The following verses are the cross-references at
www.blueletterbible.org.
Exodus 21:22 NASB - "If men struggle with each other and strike a woman with child so that she gives birth prematurely, yet there is no injury, he shall surely be fined as the woman's husband may demand of him, and he shall pay as the judges decide.
Exodus 21:23 NASB - "But if there is any further injury, then you shall appoint as a penalty life for life,
Exodus 21:24 NASB - eye for eye, tooth for tooth, hand for hand, foot for foot,
Exodus 21:25 NASB - burn for burn, wound for wound, bruise for bruise.
Exodus 21:26 NASB - "If a man strikes the eye of his male or female slave, and destroys it, he shall let him go free on account of his eye.
Exodus 21:27 NASB - "And if he knocks out a tooth of his male or female slave, he shall let him go free on account of his tooth.
Leviticus 24:19 NASB - 'If a man injures his neighbor, just as he has done, so it shall be done to him:
Leviticus 24:20 NASB - fracture for fracture, eye for eye, tooth for tooth; just as he has injured a man, so it shall be inflicted on him.
Deuteronomy 19:19 NASB - then you shall do to him just as he had intended to do to his brother. Thus you shall purge the evil from among you.
Do you believe in equity of judgment which is eye for an eye punishment (determined by a judge I believe) as opposed to personal vengeance, or do you believe no judgment unto punishment should be made but rather encouraging people to love each other? I don't know how you see an eye-for-an-eye to be one of a works of the Law, except that some might personally want a punishment equal to the wound that has been inflicted them. That is at least not what the scriptures were saying (Torah verses quoted above).
Now if we are to love our neighbor even when we are harmed we must know or learn how it is possible to do that, certainly. But the verse quoted in the OP is about how it is by faith and not by the works of the Law that a person receives the Spirit of God.
See Romans 8:1-4.