Maybe you didn’t really lose that value. You just converted it into knowledge that will help you persevere much more in the future.
I have done something similar in the first parts of my journey too, and i think many of us have.
What you have gained from those lessons will stay with you. Its powerful and it almost always takes loss to truly learn.