That is a difficult place to find yourself. You are not alone. I have found myself at several times in my life asking "why am I doing this job? Why did I start this business? Why did I ever think this would be a good project?".
How to Motivate yourself?
First, get clear and specific about what is going well and what is not going well.
For example: "I hate this specialty" -> what specifically do you hate? I find it helps to break "studying electrical engineering" into specifically:
- what you enjoy and do well,
- what you enjoy but don't do well,
- what you don't enjoy but do well,
- what you don't enjoy and hate.
"Force yourself to study" -> is a long and difficult path. It is best to avoid this approach to life.
Clarify the answer to the question: what needs to change in order for me to be personally and professionally fulfilled in 5, 10,20 years. Will electrical engineering help you achieve these goals?
How Andre Agassi re-discovered his Motivation...
In his autobiography, Andre Agassi, the #1 tennis player from a few years back shares how he grew to hate tennis. He hated practice, he hated playing, he couldn't motivate himself to play. He dropped down the rankings.
He stopped and thought deeply about what he wanted to do. He wanted to create a school that really helped young kids. He needed money to create this school. How could he generate this money? Tennis.
He stopped looking at tennis as an end in itself, but as a means to generate the resources that would allow him to build the school. He puts lots of his money into the school. This is how he re-found the motivation to practice and travel to tennis tournaments and coach and play in pro-ams.
If you cannot see any way that "studying electrical engineering" will improve your life or the life of people you care deeply about, then maybe it is better to walk away.
If you can't walk away, do the work to define a future for yourself that is only possible if you become excellent in the field of electrical engineering.