IntroductionDepression is the most common comorbidity of rheumatoid arthritis (RA). In particular, major depressive disorder (MDD) and rheumatoid arthritis share highly overlapping mental and physical manifestations, such as depressed mood, sleep disturbance, fatigue, pain, and worthlessness. This overlap and indistinguishability often lead to the misattribution of physical and mental symptoms of RA patients to depression, and even, the depressive symptoms of MDD patients are ignored when receiving RA treatment. This has serious consequences, since the development of objective diagnostic tools to distinguish psychiatric symptoms from similar symptoms caused by physical diseases is urgent.MethodsBioinformatics analysis and machine learning.ResultsThe common genetic characteristics of rheumatoid arthritis and major depressive disorder are EAF1, SDCBP and RNF19B.DiscussionWe discovered a connection between RA and MDD through immune infiltration studies: monocyte infiltration. Futhermore, we explored the correlation between the expression of the 3 marker genes and immune cell infiltration using the TIMER 2.0 database. This may help to explain the potential molecular mechanism by which RA and MDD increase the morbidity of each other.