I am using the boxed equation format shown here.
However, it flows out of column bounds when following the IEEE journal format as shown in image.
\documentclass{article}
\usepackage{color}
\definecolor{myblue}{rgb}{.8, .8, 1}
\usepackage{amsmath}
\usepackage{empheq}
\newlength\mytemplen
\newsavebox\mytempbox
\makeatletter
\newcommand\mybluebox{%
\@ifnextchar[%]
{\@mybluebox}%
{\@mybluebox[0pt]}}
\def\@mybluebox[#1]{%
\@ifnextchar[%]
{\@@mybluebox[#1]}%
{\@@mybluebox[#1][0pt]}}
\def\@@mybluebox[#1][#2]#3{
\sbox\mytempbox{#3}%
\mytemplen\ht\mytempbox
\advance\mytemplen #1\relax
\ht\mytempbox\mytemplen
\mytemplen\dp\mytempbox
\advance\mytemplen #2\relax
\dp\mytempbox\mytemplen
\colorbox{myblue}{\hspace{1em}\usebox{\mytempbox}\hspace{1em}}}
\makeatother
\begin{document}
\begin{empheq}[box={\mybluebox[5pt]}]{equation*}
a really long equation resides here that flows out of bounds completely, please behave
\end{empheq}
\end{document}
I need to contain it within the column. Usually in figures, I have the option width=\columnwidth. I tried that but it does not work in this environment. I have searched online but have no solutions.

\documentclass[compsoc, conference, letterpaper, 10pt, times]{IEEEtran}. I am not sure how to split it into multiple lines, I tried:\\\. – learnerX Mar 29 '18 at 23:24splitenvironment to split it but I would still like to reduce the actual size of the text in the equation to fit the column if that is possible. – learnerX Mar 29 '18 at 23:26\[ believe me, a really long non-emphasized equation does not behave better, you need to take care of what you type\]– Mar 29 '18 at 23:39