Good Day Friend, Thank you for expressing your concern here.
Overthinking about past or future will obviously bring in worry, fear, depression , anxiety similar emotions. As body and mind are closely interconnected, such negative emotions can easily affect your thinking patterns.and also cause disturbances to body functioning like sleeplessness, headache, digestion issues, PMS, constipation, body pain, weight gain or loss and many more.
If you try to understand the root cause here, it's your overwhelming "thoughts".
So managing, controlling or diverting your thoughts and being in present moment is the solution.
However it's not a easy one that you alone can achieve . You may need support and guidance like psychologist or Therapists.
Next Steps
Be positive. you will be alright soon. feel free to reach me online for further assistance and assessment of your physical and mental symptoms to recommend suitable solutions.