Depending on where you use them for, I might recommend looking for a pair of wireless headphones? I've had issues with wired headphones I use for my computer for years until I finally managed to get a pair of wireless ones. Haven't had issues since.
As for earbuds; I tend to go through a lot but for some reason they tend to "blow up" eventually because I have them at the loudest (and hush; before you say, I'm destroying my ears with it. If I'm out I prefer to listen to music instead of hearing traffic, which still at times blares over my music no matter how loud I play it; which makes me wonder if traffic isn't as harmful for my ears as well).
Anyway; I tend to last a bit longer with more expensive earbuds though. Cheap ones often break either at the cable (especially in winters) and I sometimes lose the rubber tips on those in-ear things. I've fixed losing those rubbers by buying the same brand and type every time so if I lose one and buy now ones, I at least have one of those rubbers as back-up. Saves me from buying new ones every single time.
Suppose there's also a notion of just being more careful with your stuff. I haven't stepped on my earbuds for years since I never place them anywhere they can be stepped on (my iPod with earbuds goes in my hoodie, and my hoodie goes on a hook on the wall when I get home).
Back in my teens when I didn't have cash to buy new earbuds every time they broke, I'd often end up having these frankenstein earbuds made out of different sets I cut up and just connecting the cables and taping it together.