Omega-3 together with vitamin B2 repolarizes microglia from pro-inflammatory state to healing state, so no wonder your brain got a boost. Now, how can I tell if Omega-3 capsules are rancid?
Good omega-3 oil has a pleasant taste, there is really no need to eat capsules made from chemically-modified cellulose or who knows what other material that is not suitable as food.
The omega-3 oil can be mixed with whatever oil you add to your food, e.g. to a salad.
The pure oil is cheaper and you can feel its taste without having to break capsules. Moreover you do not have to ingest capsules made of dubious substances, besides the desired oil.
Once opened (but preferably also before) such an oil bottle should be kept in a refrigerator.
Some bottled oil includes flavors, e.g. lemon, which mask its natural taste. Unflavored omega 3 oil is preferable.