This story originally appeared across the BBC World Service.

We all know that carrots and broccoli are good for our health, but would you spend your whole day eating them?

Anything in excess has its downsides, yet many of us seem happy to binge on technology.

On a typical day, internet users spend an average of six-and-a-half hours online, according to a survey conducted in 34 countries by the consumer data firm GlobalWebIndex.

Users in Thailand, the Philippines and Brazil report spending over nine hours connected, according to the survey.

And a third of time online is now spent on social media.

What does tech do to your brain?

The impact of technology on our physical and mental health is still the subject of scientific studies.

Shimi Kang is a Canadian psychiatrist who specialises in child and adolescent mental health, focusing on addiction.

She told the BBC: "Technology is increasingly being linked to anxiety, depression, body image disturbance, and internet addiction disorder has now become a medical diagnosis."

But just as there are healthy foods, super foods and junk foods, there are several types of technology – and if we want a healthy relationship with them, we need to understand how they impact our brains.

How your brain reacts to tech

Kang says our brain "metabolises" technology by generally releasing six different types of neurochemicals into our bodies:

• Serotonin - Released when we are creative, connected, and contributing.

• Endorphins - The "painkiller" of the body. Released when we experience mindfulness, meditation, gratitude, and cardiovascular exercise.

• Oxytocin - Released when we have exchanges in a meaningful connection. It is generally healthy but online predators can tap into its effects to abuse their victim's trust.

• Dopamine - A pleasure neurochemical linked with instant reward but also addiction. Technology is increasingly being designed to specifically trigger the release of dopamine.

• Adrenaline - Best known for regulating our responses in fight-or-flight situations, but also released by likes and pokes on social media.

• Cortisol - The hallmark of stressed-out, sleep-deprived, too-busy and distracted individuals.

So not all technology is the same, but more importantly, not all experience with technology is.

Healthy, toxic and junk tech

"Healthy technology is anything that would give us that metabolism of brain-boosting serotonin, endorphin and/or oxytocin," Kang says.

Some examples are meditation apps, creative apps, as well as connection apps that allow us to bond with other people.

But add a good dose of habit-forming dopamine and you are entering a dangerous territory that can lead to addiction.

"Let's say there is a creative app and your child really loves making movies with it. But now they're just doing it too much, spending six, seven hours a day on it," she says.

"It's not junk tech, like Candy Crush, which is all dopamine – but you still have to be careful and set limits."

On the other end of the spectrum there is junk technology, which she says we might use "when we're just destructing ourselves."

She compares it with emotional-eating junk food, which "we do when we're stressed."

"The really toxic stuff we worry about is when you are just getting that hit of reward. Let's say, pornography, cyber-bulling, gambling, addictive video games designed like slot machines, or engaging with hate speech."

'Tech dieting'

Any healthy tech diet would stay away from the toxic stuff, says Kang. But a little naughtiness in moderation might be possible.

We are all advised to avoid processed food and sugary drinks, but it's generally OK to have pizza and popcorn with your children on a Friday night.

Similarly, it is probably okay to "snack" on mindlessly scrolling through your Instagram account or playing a video game.

However, if you are diabetic or prone to diabetes, your medical recommendation concerning sugar will be much stricter than that prescribed for the general population.

It is the same with technology, says Kang.

"If you are an individual with a family history of addiction, anxiety, depression, or time-management issues, for example, then you have to be careful, because you are at a higher risk of converting them to the toxic addiction."

Teenagers in particularly are more vulnerable and there is enough research to identity those who are more prone to getting in trouble online, she says.

'Digital detox'

Access to the internet and smartphone penetration are still expanding in the world but there already appears to be some resistance to a constantly connected life.

According to GlobalWebIndex, seven in every 10 internet users in the UK and the US say they have adopted some form of tech "dieting" or even gone for a "full digital detox".

This could range from closing a social media account and deleting apps to heavily cutting down time spent online.

Technology use needs to take into account all our other basic human needs, says Kang.

"We still need to sleep eight or nine hours every night. We need to actively move our bodies two to three hours every day. We need to stretch, we need to go outside and get natural light," she says.

"Even if you're doing the best tech, if you're doing it at the expense of other human activities, then it's too much."

To comment on this story or anything else you have seen on BBC Capital, please head over to our Facebook page or message us on Twitter.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.