Will it be a good idea to take 3 months off after PhD defense to improve my skillset and work on my mental wellbeing? I have struggled throughout my civil engineering PhD. My topic was away from the realm of my advisor's expertise, and as a result my research can be considered as an independent endeavor. She (advisor) was always there to guide the direction, but she didn't give any technical input to my research.

In addition, my group colleagues, who worked in topics related to my advisor's expertise, published several publications in prestigious journals (IF > 10). While, I struggled to get one published in a 2 impact factor journey. This caused a lot of anxiety during my first 3 years of PhD.

On top of this, my advisor did not proactively correct my manuscripts I had submitted her. So, lot of my manuscripts are pending her consideration. This also affected my mental peace.

Being in final year, I started looking for postdoctoral positions since the beginning of the year. Applied to many, but was rejected. My advisor said to me the other day that if I don't get a postdoctoral offer, I can stay in my current lab for next 6-8 months and search for positions.

I am all burned out and having it difficult to be optimistic about my future. I am thinking of taking some time off (2-3 months off) (I have some savings to pull that off) after my PhD to gather my composure, work on my programming skills, and then join my current lab as a stop gap while searching for positions. I am already 30 years of age and have been a student throughout.

Will it be a good idea to take 3 months off after PhD defense to improve my skillset and work on my mental wellbeing? No, I have not been to any mental health counselor.
I took about 3 months off. I just did not very actively search for positions and when I found one ask for plenty of time to prepare (the start date was basically "whenever you can make it" from my employers point of view).
It was amazing. Yes, in that time I was in the process of interviewing (but I had not applied for more than this one job yet, that just was too good to not try) and then packed up my life and moved to another country. But I also met with friends, slept in, decluttered my stuff, data and brain, visited family and just took time to recover. 

Everyone so far has reacted very positively to this fact. My family and friends admit that it made me a more happy, balanced person. My colleagues and supervisors (old and new) encouraged me to take the time off and stated multiple times that this was an appropriate and good thing to do. Even the lady at the office where I had to sign up as unemployed completely understood the situation and promised me not to bother me for at least three months, as long as I kept making progess with at least one application.