Help!

Naomee
My first pregnancy I miscarried. 
This is my second pregnancy I'm in the first trimester and I'm worried. 
I've been doing everything I can possibly think of to keep it from happening but unfortunately some things can't be controlled. I'm now on my 5th week... my 3rd and 4th week I was having pelvic pain which the doctor said could be an ectopic pregnancy or could be because of my bowel movements. Luckily the pain has subsided. Any suggestions or words to help ease my mind?