How to calculate optimal temperature to extract specific compounds from herbal teas?
No, calculating is practically impossible, there are too many variables. It's not about density and melting point, it's about tons more. 

The way you'd go about it is like everything else in biology: empirically. You'll have to brew your herbs with different temperatures (and ratios of herb to water! These are very important) and use some method for measuring the resulting solute. Sadly, you'll likely need expensive lab equipment for that, although some specific compounds may have characteristic reactions which allow for easy analytical chemistry. 

If your compound is very interesting, there is a chance research on it has already been made. You can search Pubmed and Google scholar for phrases like "Extraction of X from Y" where X is the compound and Y the plant. Try doing it with an account which has access to scientific journals' paywalls, for example by becoming a subscriber to your nearest university's library - many will allow this for citizens who are not immatriculated.