use every game (not just losses, wins also) as feedback for yourself. picture yourself as a player, and think of all the different aspects of your gameplay that go into making the full version of yourself as a player, and rate yourself in each aspect.
how good are your punishes? do you max punish mistakes every time?
how good is your defense? how good are you at escaping disadvantaged situations quickly and with minimal damage taken?
how good is your neutral? are you playing as cheap as you can? do you feel confident you know this matchup, what your path to victory is, and how to tilt the risk vs reward of interactions in your favor?
and so on for every category you can think of
when you think of your experience with fighting games in this way, it becomes an exercise in self-improvement, rather than an ego-driven comparison with other players. in a way, your opponent is not really the players you beat or lose to. your opponent is yourself and your own shortcomings, and other players are external challenges to test yourself against.
take the emotion out of it. your job as someone who wants to improve is to learn as much as possible about the game and the matchups for your character, build gameplans from that, execute them, then reflect on how well you did and what you need to work on.
for a few years I had the wrong mentality when playing online. I’d care really deeply about winning every game, and get annoyed when I lost, especially to people who I thought were gimmicky or lag-abusing, or whatever the reason was. when you stop thinking of other players as “guys I really want to beat to prove that I’m strong” and start thinking of them as “opportunities to test myself against” you end up in a healthier place IMO.