For me it always felt like if I'm spending extended time browsing HN, Twitter, Facebook etc. this is usually a sign that I'm in a worse mental state than usual. There's likely a feedback loop there indeed, but when I feel better I just naturally don't spend so much time there; I don't feel the need and get busy with more productive things.