How Much Should Emotions Influence Investment Decisions?

I’m trying to get better at investing, but I’ve noticed my emotions sometimes sway my decisions like holding onto a stock too long because I’m attached or panicking during a dip. How do you balance gut feelings with logic when investing? Is there a place for emotions, or should they take a backseat? Curious to hear your thoughts!