This article reports on original research investigating teacher wellbeing while teaching mathematics in relation to teacher identity. Using survey data from mathematics teachers (N = 402) participating in a teacher of mathematics support initiative, teacher wellbeing was operationally defined as the experience of wellbeing whilst teaching, allowing an applied understanding of wellbeing in relation to the activity of teaching. Teacher identity was construed from prior research by the authors (Willis et al., in: Math Educ Res J, 10.1007/s13394-021-00391-w, 2021) and operationalised for the current study in terms of a specific teacher of mathematics identity (ToMI) construct. The main research question for this investigation was directed at how well the ToMI construct, as a wellbeing variable, was able to predict teacher wellbeing while teaching, viewed as an ‘in situ’ or ‘active’ (applied) measure of wellbeing. Identity-Based Motivation (IBM) theory was used to frame the research, as it helps explain how the degree of congruency between identity and wellbeing may influence motivation to teach. Results indicated that although several important factors relate significantly to teacher of mathematics wellbeing, the ToMI construct predicted teacher wellbeing far above the ability of all other study factors combined, suggesting that a focus on the development of a professional identity for teachers is fundamental to the support of teacher wellbeing in schools. Suggestions for investigating this focus at the school level are also provided.