We are so sorry to hear of your ectopic pregnancy and wish you a refuah shlaimah.
In general, following a pregnancy loss within forty days after conception, a woman may immerse in the mikveh as soon as she completes her seven clean days. (If a pregnancy lasted more than forty days after conception, immersion may not take place before fourteen days have elapsed from the surgery/miscarriage, if the gender of the fetus was unknown. It sounds like over fourteen days have already passed since your surgery, so even in that case you may immerse as soon as you complete the seven clean days.)
Stitches that dissolve on their own are not considered a chatzitzah.
Visible glue is a chatzitzah and should be removed prior to immersion as much as possible. Please ask your physician whether this glue can be picked off after the scar has healed sufficiently (probably about one week after surgery). Tiny remnants that remain do not invalidate tevilah.
You should follow any instructions your physician has given you regarding bathing and resuming relations. It is permissible to immerse for purposes of other types of physical affection even when relations need to be delayed for medical reasons.
Please feel free to get back to us with any further questions.
BHatzlacha!