You should get rid of that mindset since I believe that it is affecting you more than you think it really is. No matter how good you are as a player, you will always get hit no matter what, and most professional players do get hit a lot and will often lose stocks. It’s sometimes possible for a pro player to avoid getting hit during the match, but many will get comboed or just outplayed. The best way to practice to avoid yourself from racking up damage is to play neutral and space yourself. You shouldn’t blindly run and play aggressive against your opponent without some sort of plan, since it’s really easy to read your options. Practice spacing and playing patient, and waiting for openings to follow up. Playing neutral is especially important since having the advantage at neutral can allow you to follow up with options against your opponent.
Another way is to practice how to utilize DI, since it helps you to survive to avoid dying at early percents. There are various tutorials on YouTube that show how you can utilize DI in your advantage, whether it is to survive at higher percents or to avoid combos. Smash DI is also useful, but Ultimates SDI is very limited.
Just note that you won’t improve in just one day. Just play how you normally play and review the match to see what’s causing you to get hit so often, and develop a strategy to outplay your opponents.