Do you know what is causing the mental block?
You may want to seek assistance through a marriage counselor. I am assuming your girlfriend is aware of your distress? And would be willing to go as well.
If you feel more comfortable, and think this is a mental hang up surrounding the dating of others, then you can do this on your own.
There are many exercises to help rekindle the flames physically, but if you feel it is related to a mental block, you will need to work to overcome this issue.
There are also medications to assist with the erection issue, until you are emotionally able to perform independently, so to speak.
I take it your relationship is sound, otherwise?
Many men make sex the end all in the relationship, so it is not surprising that you think about her with someone else and become nervous, continuing the cycle.
Since we will assume it is the mental block, you will need to learn to do some emotionally unblocking exercises to assist. This usually involves emotional work with your partner. Most people will tell you the secret to great sex is from the neck up, not the neck down.
So a couple of things to do:
Communication daily. Nurture the reasons you have gotten back together. You both have decided after a separation to come together as a couple, so there is some reasons why you are together. Talking about these daily helps to rebuild your relationship, create affirmations for each other and for yourself.
Complete three sentences daily. You must only discuss the current day. Both of you cannot change the past, but can move forward from here. These are the sentences:
I appreciate.....I regret.......and I request........
Each of you must complete these sentences to each other, one at a time. Stay focused on what your partner has done that you appreciate, and vice versa. Regrets and requests, and vice versa also. This will start the communication lines opening up again.
Nondemand pleasuring and sensate focus. In exercises involving nondemand sensate focus, the clients initially avoid sexual intercourse. In fact, couples are forbidden to engage in any sexual activity until the therapist instructs them to do so. Over the course of treatment, they receive homework assignments that gradually increase their range of sexual behaviors. Initially, only kissing, hugging, and body massage may be allowed.
The partners are instructed to take turns in the roles of giver and receiver as they touch and caress each other's body. When playing the role of giver, the person explores, touches, and caresses the receiver's body. In applying this technique, called nondemand pleasuring, the giver does not attempt to arouse the receiver sexually. In an exercise called sensate focus, the receiver concentrates on the sensations evoked by the giver's touch on various parts of the body. In these exercises, the giver's responsibility is to provide pleasure and to be aware of his or her own pleasure in touching. The receiver's role is to prevent or end any stimulation that he or she finds uncomfortable or irritating by either telling or showing the partner his or her feelings.
The next step is to engage in nondemand breast and genital caressing while avoiding orgasm-oriented stimulation. If the partner or the person who is experiencing sexual difficulty becomes highly aroused during this exercise, that partner may be brought to orgasm orally or manually after completion of the exercise.
Read more: Sexual Dysfunction - Sex Therapy http://family.jrank.org/pages/1506/Sexual-Dysfunction-Sex-Therapy.html#ixzz0c5mgVDWQ
There are many, many websites with suggestions such as this. Most of them involve exercises that teach you how to nurture one another without sexual activity, which takes a lot of pressure off of your performance. If you will do a web search for: psychosexual dysfunction, you will avoid most of the pornographic sites.
This issue can be very complicated and difficult to talk about. But it can be overcome, with a few extra exercises, or some brief cognitive behavioral therapy. I hope this helps. Gina
Please let me know if you have further questions. Best to you. Gina