I get some benefit from my rare losses by always owning appreciated stocks. If I have a loser, I might sell off some appreciated stock.
I virtually never sell my winners; some have been in my family for decades (like Rockwell International) that was bought by a distant uncle, left to his sister and became mine eventually). Meanwhile it spunoff several other winners, such as Skyworks Solutions (SWKS). It's also paid 30 years of nice and growing cash dividends. Rockwell International became Rockwell Automation (ROK) and Rockwell Collins (COL) years ago. Perfect example of the adage: "The More You Trade the More You Lose."
I also own some mutual funds that are required to distribute their gains each year.
Best to own an assortment of quality investments so you'll always have some winners even in bad markets.