Hi.... If you are missing your classes and not giving time to your studies... that means you know already how your psychological issues are affecting your life.
Thoughts not constant...... Well thoughts can never be constant... they change every millisecond.... Overthinking and or negative thoughts are a trouble. Nervousness points towards anxiety and fear. Now what is causing this is a question you need to answer.
Next Steps
You have recognised you need help. Now kindly take expert help. Meet a psychiatrist at the earliest and learn to cope up with the stress you going through. Headache will go too.
Health Tips
Please dont punish and torture your self further. Break the stigma of sorting psychological help. You can do it. Let the hope never die. Take care.