How to know if one is suitable for pursuing academia or Research work their entire life? I am a PhD student in engineering in an university in Canada. I am close to completion of my thesis but I am not very proud of my work. I have couple of publications from my work, all in decent journals. I feel that I have not utilized the opportunities available to me and wasted time in personal activities that did nothing to my CV. 

Owing to my inadequate performance during PhD. I am constantly regretting my decision of pursuing higher studies. I was never a star student. My undergrad was from a very low ranking school where I had received very average grades. However, I somehow got into the top graduate school where too I struggled in getting average grades. My research there was very unimpressive and not a single professor urged me to pursue PhD. My master's advisor even expressed shock when I had asked for his recommendation for applying to PhD school.

However, luck struck again, and I got into a reputed PhD program. My advisor has had a lot of patience with me. She is a hands off kind of person, but she has never complained about my performance till date. Now as I am completing my thesis, I am confused about my future career trajectory.

I feel like I do not belong to academia or research industry as I don't possess the necessary skills (sound technical skills, exceptional analytical skills and focus). I feel like a failure who is in a wrong profession. I really don't know what to do now.

My only reason for pursuing PhD in my current field of study was that I loved the process of researching. I loved finding reason behind why a physical phenomenon occurs. But, I now feel that just love for research is not an adequate reason for doing PhD or master's degree.

In short; I have realized that I am not not suitable for academia or research industry as I don't possess the necessary skills for pursuing research. I should have taken the engineering job after my undergrad as I was never built for a life in research.
So you are going to finish your PhD soon and you are thinking about what to do?

I understand your regrets, but they don't help you (as you probably know yourself). 

The question remains: What are your options now?

First of all, you do not make a decision for your entire life. You can start a research position and leave it after three years, it is not really helpful to try to plan for 30 years of more. You can either try to get a research position after your PhD, and if you get one, decide again after two to three years. Or you can look for challenging positions in the industry. Both approaches are entirely sensible. 

Just don't consider leaving academia as a failure. Most people leave academia sooner or earlier and many find an interesting, good job.