As said in the comments, you need to use Einstein's equations (no cosmological constant for simplicity):
$$R_{\mu\nu} - \frac12 R g_{\mu\nu} = \frac{8\pi G}{c^4} T_{\mu\nu}$$
Your energy goes into the energy-momentum tensor $T_{\mu\nu}$; in particular, there is a formula which you can use to find the energy-momentum tensor of an electromagnetic field. The left hand side contains $R_{\mu\nu}$ and $R$, which are very complicated functions of the metric tensor $g_{\mu\nu}$ and its derivatives. Since all the tensors here are symmetric, this is a system of 10 coupled nonlinear partial differential equations which you can solve in principle to find the metric tensor.
In practice, almost no one does that. If you think that the curvature will be small then you can get an approximate version of the equation that is linear and relatively straightforward to solve. If you can't do that then you will either need some symmetry to simplify the metric tensor (such as spherical symmetry for the Schwarzschild solution), or solve the equations numerically, which isn't easy either. Wikipedia has some information on the subject.