Today we’ll have a look at the colloquial expression se prendre la tête, which translates literally to “to take the head” and means “to get worked up”, “to let something get to you” and “to let something do your head in”.
se prendre la tête
to get worked up

Example sentences
For this first sentence, y is an indirect object pronoun meaning “it”. It’s used for verbs followed by the preposition à. In this case, penser à quelque chose (to think about something).
Arrête d’y penser ! Tu te prends la tête pour rien !
Stop thinking about it! You’re getting all worked up for nothing!
This sentence uses the impersonal expression il faut, which translates literally to “it’s necessary” but has many meanings including “you have to”. Donc translates to so and therefore but can be used as a filler word to start sentences.
Donc les gars, il faut arrêter de se prendre la tête !
Ok guys, stop getting all worked up!
Also note that a subject can precede prendre la tête. For example:
- Ce mec me prend la tête ! This guy is doing my head in!
- Ça me prend la tête ! It’s (or that’s) annoying me / p*ssing me off!