The COVID-19 pandemic has highlighted a need for improved frameworks for drug discovery, repurposing, clinical trial design and therapy optimization and personalization. Mechanistic computational models can play an important role in developing these frameworks. We discuss how mechanistic models, which consider viral entry, replication in target cells, viral spread in the body, immune response, and the complex factors involved in tissue and organ damage and recovery, can clarify the mechanisms of humoral and cellular immune responses to the virus, viral distribution and replication in tissues, the origins of pathogenesis and patient-to-patient heterogeneity in responses. These models are already improving our understanding of the mechanisms of action of antivirals and immune modulators. We discuss how closer collaboration between the experimentalists, clinicians and modelers could result in more predictive models which may guide therapies for viral infections, improving survival and leading to faster and more complete recovery.