I too am a software developer with perfectionist tendencies, so I understand what you're going through. My initial instinct was to suggest that in order to effectively work on a project with budget and time constraints, you'll need to work to find a balance between hitting project goals / delivering value, and achieving your personal beliefs about code quality / best practices; that you can either find a middle ground with your teammates, or you can find a new job - that those are the options available to you, but...
After I read your post through a few times, I came to an understanding that I don't believe you've come to see yet:
Sorry buddy. I hate to break it to you, but it's looking like that's the case. Your bosses, your teammates, your friends, your family, and your girlfriend - they are all telling you the same thing, and yet you still think you're right and everyone else just doesn't understand. Even worse, you delude yourself into thinking by being stubborn and firmly standing your ground, you'll eventually persuade, not just one other person, but literally everyone you know, to see things from your perspective and to admit that you're right and that they're wrong.
Do you understand how unrealistic that is?
I don't want to leave this job because I work for a reputed company and want to communicate my feelings to everyone so that they understand that I am not wrong in what I am doing. Somehow somewhere maybe I am not able to communicate to everyone my point of view.
You're letting your job, your reputation, your social life, and your romantic life all suffer, and for what? So that your ego won't be bruised? So that you won't have to admit that you've made a mistake, that you've erred in judgement? Take a deep breath. Realize that life will go on, but that you are wrong, that you need to accept this, and then take responsibility for all the problems in your life that your obstinate stance has caused. Apologize to those who you've hurt. Make amends for your wrongs. You're going to be OK. Your ego won't be though. This is part of life. We're all human, no one is perfect.
In regard to how your bosses have responded to this problem, you write:
My bosses know that I am doing things the right way but they try and mount pressure on me to follow the working style but match the speed of others which is not practically possible.
Right now I facing criticism and maybe looking at losing my job. My boss told me although I was doing things perfectly and that he liked my work but said I was being a negative influence being a procrastinator.
Have you considered why your bosses tell you first that they recognize that your approach produces high quality code, before following this with the problems that it's causing? Your bosses think that by addressing the problem with you in this way, that you won't feel as hurt by the fact that they're telling you that your approach to your work is problematic. They tell you this in a way that makes it easier to hear, thinking that you'll be less upset, and more receptive to their requests. Instead you take it as validation that you're still doing things in the right way, but that you've somehow failed in some other way: by not working fast enough or hard enough, or by not properly convincing people of the validity of your approach.
Whatever the alternative may be, you refuse to admit to yourself or others that you were wrong. Instead you're internalizing the issue, saying you "feel like a loser right now." You'll feel a lot more like a loser if you lose your job, your girlfriend, and your friends, and damage your relationship with your family simply because you can't admit that you're wrong.
If you want to write perfect code that you can be proud of - if you want to write code that you have full control over - start an open source project in your free time. This can help you practice these beliefs you have, your philosophy of how software should be created, while permitting you to loosen these constraints which are prohibiting you from meeting deadlines, and are causing conflict at your work place between you and the other members of your team. Realize that you are imposing these constraints on the code that you deliver at your job, and that your set of criteria for what you feel makes your code "good enough" to deliver are much more restrictive than the set of criteria set by your teammates, and those expected by your bosses.
In order for you and the rest of your team to work together amicably moving forward, first you'll need to apologize for any problems that you've caused, then you'll need to either (A) work to find a middle ground, or (B) accept that it may be time to find a new job more suited to your approach to software development.
Maybe this team just isn't the right fit for you, and maybe it never will be. It sounds like you may have ruined any chance of salvaging your reputation with the people you work with. Maybe finding another job is the best thing for you and your mental health. It will give you a fresh opportunity to approach your work in a way that is conducive to reaching compromises between your idealism and the world's realism.
Bringing the focus back to this post, you asked:
How can I clarify that I want to keep up my quality of work, but that it takes more time for me to do so, so they don't think I am procrastinating unnecessarily?
You don't. Don't let your pride ruin your life.