I would like to find the general solution for the gravity between two (flat) triangles in 3D, including the location $(x,y,z)$ where this force should be applied (in order to later account for rotational forces.)
Given two triangles $t_1$ and $t_2$, which are defined by the points $t_{1v_1}$, $t_{1v_2}$, $t_{1v_3}$, $t_{2v_1}$, $t_{2v_2}$, and $t_{2v_3}$. Each of these points has $x$, $y$, and $z$ coordinates. For example, $t_{1v_2}y$ would be triangle 1 $\to$ vertex 2 $\to$ y coordinate.
Note: This will ultimately be used in the physics engine for a 3D space game (used with JBullet).
My attempt at a solution:
The formula for gravity for point masses is:
$$F_{\text{gravity}}=G\frac{\text{mass}_1 \times \text{mass}_2}{\text{radius}^2}$$
Which is easily expanded out to:
$$F_{\text{gravity}}=G\frac{\text{mass}_1 \times \text{mass}_2}{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2}$$
With unit direction: *which is not considered in the following equations, but ultimately needs to be
$$\text{dir} = \text{normal}(\text{point}_1-\text{point}_2)$$
We must consider the entirety of each triangle:
$$\int_0^1\int_0^1(t_{1v_3}x \times q+t_{1v_2}x \times (1-q)) \times r+t_{1v_1}x \times (1-r)\ d_q\ d_r$$

By combining the equation for gravity with the integral of a single variable over a triangle, we get:
$$\int_0^1\int_0^1\int_0^1\int_0^1 \left[ \frac{(\text{mass}_1 \times \text{mass}_2 \times G)}{(((((t_{1v_3}x \times q+t_{1v_2}x \times (1-q)) \times r+t_{1v_1}x \times (1-r))-((t_{2v_3}x \times s+t_{2v_2}x \times (1-s)) \times t+t_{2v_1}x \times (1-t)) ))^2+((((t_{1v_3}y \times q+t_{1v_2}y \times (1-q)) \times r+t_{1v_1}y \times (1-r))-((t_{2v_3}y \times s+t_{2v_2}y \times (1-s)) \times t+t_{2v_1}y \times (1-t)) ))^2+((((t_{1v_3}z \times q+t_{1v_2}z \times (1-q)) \times r+t_{1v_1}z \times (1-r))-((t_{2v_3}z \times s+t_{2v_2}z \times (1-s)) \times t+t_{2v_1}z \times (1-t)) ))^2 )} \right] \ d_q\ d_r\ d_s\ d_t $$
Is this correct? What is the final solution? (including the position and/or angle of the force) Alternatively... Is this problem unsolvable?

This computation is essentially the same as computing the "Form Factor" in rendering (for computer graphics). It turns out that the integrals (once you include the direction of the force as you should) are not nice (i.e., involve dilogarithms). Here's a paper that describes the computation in some detail.