Just being a human being in the Western world, you have about a fifty-percent chance of ending up with some kind of mental problem sooner or later. It could be when you're very old and you get a stroke; it could be complicated grief; it could be generalized anxiety disorder; it could be something less common. And being autistic, of course your risk is greater just because your stress level's higher. So, yes, it's a realistic thing to think about--but it doesn't make much sense just to worry. After all, anxiety is meant to spur you into planning or action, not just to hang around and make you uncomfortable.
You know how, if you want to reduce the chances of things like heart disease or high blood pressure, you get regular checkups, start eating real food, and find out what kind of physical activity you like? Well, there's a mental version of that, which will both reduce your vulnerability to mental illness, and increase your ability to manage and/or recover from one if you get it.
(Physical health, incidentally, does affect mental health. Maximizing physical health gives you maximum resources to do mental things with.)
Lifestyle stuff that maximizes your mental health:
--Having a hobby you enjoy
--Having meaningful social connections (not necessarily a lot of them, or seeing them frequently; it's having the connections at all that's important--yes, they can be online)
--Having a pet you enjoy spending time with
--Working to gain insight into your identity, personality, and thought style
--Working to gain awareness of your emotions and how they affect you
--Managing stress, to keep the level just high enough to motivate you, but low enough so that it dissipates whenever you spend time relaxing
--Spending time outdoors--sunlight has mental benefits as well as physical ones
--Keeping a good sleep schedule
--Learning things throughout your lifetime; staying mentally active (it needn't be academic subjects)
--Having purposeful activity to engage in (may be work; may be something else)
--Volunteering, formally or informally; spending time helping other people
--Keeping in touch with family, provided they're not abusive
--Having a well-defined religious or philosophical belief system; joining a religious organization
--Regularly listening to music you enjoy (seriously; music has mental health benefits)
--Keeping up an exercise program that you enjoy (it has much less benefit if you hate it and feel forced)
--Learning to understand and deal with anger
--Learning to be assertive
--Learning to recognize inefficient or dangerous coping strategies, and replace them with effective, safer ones (ex. If you drink too much or max out your credit cards when you're stressed, finding another way to deal)
--Learning to identify and solve problems when they occur, rather than assuming they are unsolvable and must be endured
--Keeping a journal; updating a blog; putting your thoughts down on paper in the form of stories, poetry, essays, etc.
--Learning your strengths and weaknesses; learning to accept and understand both
--Not keeping secrets from yourself
--Learning how to accept your own mistakes; learning it's acceptable to make mistakes
--Having some place where you can go to be alone and relax, where work, family and friends aren't allowed to bother you
--Learning to be proud of yourself for your effort and the way you used your skills, not for the way you're judged by others
--Spending as little time as possible (none, if you can) with people who do not accept you as you are
--Learning to identify the times when your feelings are illogical, and don't reflect reason or reality
--Finding out what things you are unconsciously telling yourself; changing them, if necessary
--Knowing where to find help for psychological problems (it needn't be a psychologist; counselors mentors, and religious leaders can help too), and being willing to start working on the problem before it becomes really overwhelming
--Finding ways to solve relationship problems
--Defining exactly how much you will change to please someone else, and what parts of your behavior, beliefs, and values are inviolate