Around 24-ish. I think that's around the age the brain stops developing. Also, most people will have gone through plenty of life experience by that point (school, uni, work life, etc) which can rule out most circumstantial stuff.
Lots of people who seem to have irrepairably horrible lives are going through very circumstantial issues. There are lots of kids who feel suicidal while in high school due to a toxic home life or school bullying, move away for college, and then feel happier about their lives and are no longer suicidal. Some people don't start to thrive until they enter the workforce as full-time workers.
I've been suicidal for a long time. I'm glad I didn't ctb earlier, because I seriously wasn't being rational when I first started having these feelings. And I've since had lots of happy times. I still plan to ctb eventually, but I know I am making this decision from a more logical place of mind now.
also, as for the ugliness thing, that's actually one of the main reasons I wanted to ctb when I was young. Now that I'm an adult and have control over what I eat, wear, put on my face, etc, I realized that looks are really not everything. Usually a lot of the issues that people attribute to "being ugly" are actually more reflective of mental illness stigma. Depressed, anxious, generally unstable people just don't give good vibes, and that can make it very difficult to connect with others, especially if your symptoms include lack of self-awareness or lack of hygiene. But just having a funny face isn't a one-way ticket to being a homeless bum. Similarly, being gorgeus doesn't keep you from having a unpleasant and tumultuous life.