Don't overthink it. IQ is a number, a way of trying to quantify intelligence, even though it can be more than just intellectual. In society, numbers are attributed to wealth, to how many women you've slept with in your life, to how many years you've been working, and so on. I don't deny the importance of a number as something that can "measure" a certain phenomenon, but if we reduce it to numbers, everything will be confusing, pathetic, and people will have their self-esteem on the rocks (maybe it can be measured) and think they're worse than the worst...
IQ tests are standardized and often involve things related to logic and mathematics, but our emotions, ironically, escape logic and mathematics. It's not like you have to be a 10 to want to continue living and be happy, and a 6 to find your life sucks. Otherwise, I've always found it curious that people who seem happy often want to die or feel empty...
Well, regarding mental health and cognitive decline, it's clear that there will always be a correlation. After all, you can have a hurricane of thoughts and not have the mental clarity to reflect on something, solve problems, or understand situations that you normally have the mental acuity to address. Therefore, if you consider yourself to have depression, anxiety, or another disorder, this will naturally affect your abilities. Unless you're a genius, and in fact, it's said that many geniuses throughout human history have had disorders. In fact, I know people with some mental retardation who are able to reproduce a melody on the piano after just hearing it once.
IQ? Nope.