For a start there's diagnostic criteria "E" in the DSM-5:
> E. The symptoms do not occur exclusively during the course of schizophrenia or another psychotic disorder and are not better explained by another mental disorder (e.g., mood disorder, anxiety disorder, dissociative disorder, personality disorder, substance intoxication or withdrawal).
Or equivalent from ICD-11:
> Symptoms are not better accounted for by another mental disorder (e.g., an Anxiety or Fear-Related Disorder, a Neurocognitive Disorder such as Delirium).
As well as the long differential diagnosis sections in the DSM-5 and ICD-11 [1], for example:
> Boundary with Mood Disorders and Anxiety or Fear-Related Disorders: Attention Deficit Hyperactivity Disorder can co-occur with Mood Disorders and Anxiety or Fear-Related Disorders, but inattention, hyperactivity, and impulsivity can also be features of these disorders in individuals without Attention Deficit Hyperactivity Disorder. For example, symptoms such as restlessness, pacing, and impaired concentration can be features of a Depressive Episode, and should not be considered as part of the diagnosis of Attention Deficit Hyperactivity Disorder unless they have been present since childhood and persist after the resolution of the Depressive Episode. Inattention, impulsivity, and hyperactivity are typical features of Manic and Hypomanic Episodes. At the same time, mood lability and irritability may be associated features of Attention Deficit Hyperactivity Disorder. Late adolescent or adult onset, episodicity, and intensity of mood elevation characteristic of Bipolar Disorders are features that assist in differentiation from Attention Deficit Hyperactivity Disorder. Fidgeting, restlessness, and tension in the context of Anxiety or Fear-Related Disorders may resemble hyperactivity. Furthermore, anxious preoccupations or reaction to anxiety-provoking stimuli in individuals with Anxiety or Fear-Related Disorders can be associated with difficulties concentrating. To qualify for an Attention Deficit Hyperactivity Disorder diagnosis in the presence of a Mood Disorder or Anxiety or Fear-Related Disorder, inattention and/or hyperactivity should not be exclusively associated with Mood Episodes, be solely attributable to anxious preoccupations, or occur specifically in response to anxiety-provoking situations.
> Boundary with attentional symptoms due to other medical conditions: A variety of other medical conditions may influence attentional processes (e.g., hypoglycemia, hyperthyroidism or hypothyroidism, exposure to toxins, Sleep-Wake Disorders), resulting in temporary or persistent symptoms that resemble or interact with those of Attention Deficit Hyperactivity Disorder. As a basis for appropriate management, it is important to evaluate in such cases whether the symptoms are secondary to the medical condition or are more indicative of comorbid Attention Deficit Hyperactivity Disorder.
> E. The symptoms do not occur exclusively during the course of schizophrenia or another psychotic disorder and are not better explained by another mental disorder (e.g., mood disorder, anxiety disorder, dissociative disorder, personality disorder, substance intoxication or withdrawal).
Or equivalent from ICD-11:
> Symptoms are not better accounted for by another mental disorder (e.g., an Anxiety or Fear-Related Disorder, a Neurocognitive Disorder such as Delirium).
As well as the long differential diagnosis sections in the DSM-5 and ICD-11 [1], for example:
> Boundary with Mood Disorders and Anxiety or Fear-Related Disorders: Attention Deficit Hyperactivity Disorder can co-occur with Mood Disorders and Anxiety or Fear-Related Disorders, but inattention, hyperactivity, and impulsivity can also be features of these disorders in individuals without Attention Deficit Hyperactivity Disorder. For example, symptoms such as restlessness, pacing, and impaired concentration can be features of a Depressive Episode, and should not be considered as part of the diagnosis of Attention Deficit Hyperactivity Disorder unless they have been present since childhood and persist after the resolution of the Depressive Episode. Inattention, impulsivity, and hyperactivity are typical features of Manic and Hypomanic Episodes. At the same time, mood lability and irritability may be associated features of Attention Deficit Hyperactivity Disorder. Late adolescent or adult onset, episodicity, and intensity of mood elevation characteristic of Bipolar Disorders are features that assist in differentiation from Attention Deficit Hyperactivity Disorder. Fidgeting, restlessness, and tension in the context of Anxiety or Fear-Related Disorders may resemble hyperactivity. Furthermore, anxious preoccupations or reaction to anxiety-provoking stimuli in individuals with Anxiety or Fear-Related Disorders can be associated with difficulties concentrating. To qualify for an Attention Deficit Hyperactivity Disorder diagnosis in the presence of a Mood Disorder or Anxiety or Fear-Related Disorder, inattention and/or hyperactivity should not be exclusively associated with Mood Episodes, be solely attributable to anxious preoccupations, or occur specifically in response to anxiety-provoking situations.
> Boundary with attentional symptoms due to other medical conditions: A variety of other medical conditions may influence attentional processes (e.g., hypoglycemia, hyperthyroidism or hypothyroidism, exposure to toxins, Sleep-Wake Disorders), resulting in temporary or persistent symptoms that resemble or interact with those of Attention Deficit Hyperactivity Disorder. As a basis for appropriate management, it is important to evaluate in such cases whether the symptoms are secondary to the medical condition or are more indicative of comorbid Attention Deficit Hyperactivity Disorder.
[1] https://icd.who.int/browse/2025-01/mms/en#821852937