Hello,
Do not worry at the first place ,these symptoms of overthinking and lack of concentration are obsessive symptoms .aggravated during periods of depression and stress.you can get it treated with ,medications and altering your thinking and behavioral patterns .
Next Steps
you should fix up an appointment with psychiatrist and follow up therapeutic advice.