The present invention relates to novel heterocyclic compounds based on a quinazoline scaffold of formula (I), which bind effectively to the mitochondrial translocator protein (TSPO), and counteract cell death processes. These compounds can also stimulate neuronal differentiation. The present invention further relates to pharmaceutical compositions including such compounds, and methods of using these compounds for the prevention and treatment of brain damage resulting from brain injury, especially secondary brain damage due to traumatic brain injury (TBI). The compounds of the invention are also useful in preventing, treating, and curing brain damage due to neurodegenerative diseases, including underlying and associated pathological and mental disorders. The compounds can also be used to prevent and treat brain damage due to infection, toxic challenges, and excessive drug use, e.g., recreational, over the counter, or prescription drugs. These compounds can also prevent heart failure, for example associated with brain injuries and brain diseases.