I apologize in advance, because this answer will get a bit morbid.
Full disclosure, I work as a programmer and have been active in the industry for over 15 years. I enjoy this work because it allows me to be creative and solve puzzles (as I'm sure you're aware from your post). I enjoy the challenge and the fun of building systems that work and that people use on a daily basis.
We have an emotional component to our decisions, but we should also consider some industry metrics as well. If you search for terms like "happiest profession" or "most satisfying job" you will likely see many technology related terms pop up (For example; https://www.careerbliss.com/blog/the-careerbliss-happiest-and-unhappiest-jobs-of-2018/ lists <span style="color: rgb(102, 102, 102);">.NET Developer, Sr. Software Developer, and IT Specialist all in the top 10 happiest jobs). This indicates a possible correlation between software/IT fields and happiness. Your mileage may vary.</span>
<span style="color: rgb(102, 102, 102);">When it comes to dentistry, there are studies that suggest that dentists suffer from higher rates of both suicide and depression. According to the following article </span>https://tonic.vice.com/en_us/article/5344jz/are-dentists-really-more-prone-to-suicide
<span style="color: rgb(0, 0, 0);">A </span>2015 study<span style="color: rgb(0, 0, 0);"> by the American Dental Association showed showed that 11 percent of dentists responding were diagnosed with depression, while the rate for the </span>general population<span style="color: rgb(0, 0, 0);"> was 6.7 percent. Six percent of dentists surveyed had an anxiety disorder while only 3.1 percent of the general population did. Four percent of dentists reported panic disorder, while only 2.7 percent of the general population reported the same.</span>
What I would suggest is to combine your interests in computer science and chemistry/biology. Biotech is an up and coming field with a lot of opportunities to work with (or possibly invent) exciting new technologies.