I have, under much stress and angst, often made myself the same question, and decided that I am a failure. It's a hard game, man. Maybe you are a failure. If by failure you mean that you've failed to achieve your goal of improvement, then yes, you could be. That doesn't mean you should value yourself as a person based on that. And that doesn't mean you won't ever achieve your goal.
I have a friend who doesn't know any tech. He doesn't l-cancel, he doesn't wavedash, he only edgehogs accidentally. I can be extremely technical, but that doesn't make you a better player. However, when I reached this conclusion, I decided to stop grinding tech, which was also a bad idea. You need to have consistent tech to be able to have a good mental game.
Now; I don't know how much you practice, how long you've been playing, if you have any tournament experience, or anything about you really. I assume you main Fox. If so, it's possible that maining fox and being a scrub is detrimental to your improvement since focusing on such a technical character without a solid foundation makes it much more difficult to gain that foundation. I know that was part of my problem.
Another part of it was training regiment. You have to grind tech. A lot. My practice partner grinds about two hours in the morning, but you need that tech so you can focus on more important areas, like your neutral and punish game.
The biggest problem that I'm certain you have is mindset. You can't be thinking you're a failure cause you lost in a game. Or cause you constantly lose to the same person. I can tell you from experience that nothing good will come of it except further delaying your improvement. It's possible you're going into autopilot, or not paying much attention to what your friend does, or a myriad other things. What you gotta do is force yourself to have fun, even when you lose. And force yourself to pay attention. Pay attention to why things happen, why you die, why he dies, why he does something, what bad habits you have, Focus on those things and fix them, or exploit them. I started recording my matches, and if you play on dolphin it;s really easy to set up obs and do that, which helps you focus on those things when you rewatch, pause and rewind, and it helps you focus on those things ingame once you've seen them. If you're getting too competitive, switch to Luigi and have fun for a while, go get some water, and then get serious again.
This thread has helped me with that, and I've only read the first couple of paragraphs, so give it a read if you want. Good luck man.